View Full Version : Error: Cannot load libphp5.so to server in Apache and PHP
jun_tuko
2005-11-05, 03:42 PM CST
hello gurus!!
i need your help once again. i just installed apache, mysql, and php. after i installed php and tried to run apache, i get this error:
[root@projectff conf]# 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
line 221 in my httpd.conf states:
LoadModule php5_module libexec/libphp5.so
i have read similar thread like mine but i can't find the fix for this. i have tried restorecon, chcon, and even tried chmod 777 commands to no avail.
i am logged in as root and looked at the file /www/libexec/libphp5.so's permission. it has 755 on it. it is owned by root.
i am using: fedora core 4
installed: apache 1.3.34, mysql-5.0.15, and php-5.0.5.
anybody pls. help. thanks in advance.
giulix
2005-11-06, 03:51 PM CST
Why is php shared object in /www/libexec ? On my system it's in /usr/lib/httpd/modules, together with all the other shared objects...
jun_tuko
2005-11-06, 07:11 PM CST
thanks for your reply. i did not do an rpm install on my applications. i did it manually. any idea why its giving the error message? thanks again!
giulix
2005-11-06, 07:25 PM CST
Well, the fact that it prints out Permission denied makes me think it's related to the fact that normal libraries sit into a root-owned tree readable by all (/usr/lib:/usr/local/lib:etc). If the libraries sit in the http tree, there may be a problem in the way permissions are set, leading to some processes started by the web server not being able to read their respective libraries.
jun_tuko
2005-11-06, 11:39 PM CST
hello,
i was following this book about setting up lamp. everything is working well up to the mysql installation. it's only the php that's causing the problem. i configured apache to have a prefix = /www. i don't know what happened. please help.
giulix
2005-11-07, 04:37 AM CST
Is SELinux enabled on your system ? If so, disable it and try again.
jun_tuko
2005-11-07, 11:22 AM CST
hi... im not sure how to disable selinux. i even have no idea what it does. could you please explain to me what to do? thanks!!!
giulix
2005-11-08, 04:54 AM CST
Not sure, as I don't use it, but from a quick search this is what I found: to disable it
echo "0" >/selinux/enforce
to re-enable it
echo "1" >/selinux/enforce
or use the command
setenforce
To check whether it is enabled, you can give the following command
selinuxenabled && echo "SELinux is enabled"
If it prints the string "SELinux is enabled", it is enabled; if it prints nothing, it's not enabled.
To disable it completely, you have to pass the following parameter to the kernel:
selinux=0
But check this last option before actually implementing it, since (from what I read) it may bring undesired consequences.
hth...
jun_tuko
2005-11-13, 07:36 PM CST
hi giulix,
thanks for all your help / suggestions. i was going to disable selinux but backedoff and got scared of the risk it may create. so i decided to install my apache, mysql, php using the fast way....rpms. everything works. no errors. it was actually kinda fun configuring it manually but the errors slowed me down. learned a lot from it though thru you guys. now my problem is how to remove or uninstall the ones i previously loaded. any idea?
DigitAl56K
2006-11-07, 04:45 PM CST
I had the same problem (most likely we are reading the same book ;)) on FC6. It seems to be an issue realting to the SELinux configuration as suggested above.
Just type "setenforce 0" and you can start the server. You can type "setenforce 1" afterwards if you like.
If anyone has tips on how to correctly configure SELinux to avoid this issue entirely that would be helpful (I myself am not very familiar with Linux at this point in time).
vBulletin® v3.8.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.