Apache and PHP5 Problem (FC4)
I installed apache 1.3.33 on Fedora Core 4 and everything was working like it should. Then I installed PHP5 and MySQL and changed the httpd.conf file to process the php files and when I went to restart Apache after I modified the httpd.conf file, it would not start. This is what the result was:
[root@server libexec]# apachectl start
Syntax error on line 221 of /www/conf/httpd.conf:
Cannot load /www/libexec/libphp5.so into server: /www/libexec/libphp5.so:
cannot restore segment prot after reloc: Permission denied
/usr/sbin/apachectl start: httpd could not be started
I have setup Apache and PHP (same versions) on a Fedora Core 2 machine and it worked perfectly.
Any help is appreciated.
Have you tried looking at line 221 of your httpd.conf for a start?
im having the same problem on slackware 10.1. (but with 2.4 core) most likely the culprit line in your mod_php.conf is something like:
LoadModule php5_module /lib/apache2/libphp5.so
Syntax error on line 5 of /etc/apache2/mod_php.conf:
Cannot load /lib/apache2/libphp5.so into server: /lib/apache2/libphp5.so: cannot open shared object file: No such file or directory
im a newb so.. sorry if this is an easy fix. Seems like a lot of people are having problems with apache2 + php5 though. should I tryt to recompile the kernel to 2.6.x?
I had this error using Fedora Core 5, Apache 2.2.0, OpenSSL 0.9.8a and PHP 5.1.4. It was frustrating seeing lots of requests for help and no answers so I'll put this here and see what happens.
I searched the web based on the error: cannot restore segment prot after reloc
Got the following "answer".
chcon -t texrel_shlib_t /usr/local/apache2/modules/*.soThis worked but I do get this message when the server is started;
[Thu Jul 20 22:12:27 2006] [warn] module php5_module is already loaded, skippingPerhaps a guru can tell me what I've done and the consequences. At the moment all I know is that php is now working with apache and the SSL module.
After running the chcon command above, my Apache server started without and warnings or problems. :)
apache 2 and php 5 permission error loading apache
Thanks for the posting. I found other postings that did not work. Some useful info - go to the directory where the file is that you are getting the permission errors on.
Then type ls --lcontext (or ls -lcontext on some systems)
some postings said if you are using SELINUX then type setenforce 0 as a test. If it works that confirms things. setenforce 1 turns selinux checks back on.
To fix it as indicated type
chcon -t texrel_shlib_t /usr/lib/httpd/modules/*.so
(other posts suggest chcon -t shlib_t .... but that did not work. you need the chcon -t texrel_shlib_t ...)
|All times are GMT -5. The time now is 08:31 PM.|