Error: Cannot load libphp5.so to server in Apache and PHP
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 10 of 10
  1. #1
    jun_tuko Guest

    Error: Cannot load libphp5.so to server in Apache and PHP

    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.

  2. #2
    Join Date
    Oct 2005
    Location
    CE(S)T
    Posts
    3,242
    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...
    Asus K55VD, i5 3230M - Productivity/Programming (F28)
    Asus M32CD - i7-6700, Asus STRIX-GTX970-DC2OC-4GD, 1x8 GB Sk Hynix 2133 MHz DDR4 - Gaming (W10)

  3. #3
    jun_tuko Guest
    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!

  4. #4
    Join Date
    Oct 2005
    Location
    CE(S)T
    Posts
    3,242
    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.
    Last edited by giulix; 7th November 2005 at 03:27 AM.
    Asus K55VD, i5 3230M - Productivity/Programming (F28)
    Asus M32CD - i7-6700, Asus STRIX-GTX970-DC2OC-4GD, 1x8 GB Sk Hynix 2133 MHz DDR4 - Gaming (W10)

  5. #5
    jun_tuko Guest
    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.

  6. #6
    Join Date
    Oct 2005
    Location
    CE(S)T
    Posts
    3,242
    Is SELinux enabled on your system ? If so, disable it and try again.
    Asus K55VD, i5 3230M - Productivity/Programming (F28)
    Asus M32CD - i7-6700, Asus STRIX-GTX970-DC2OC-4GD, 1x8 GB Sk Hynix 2133 MHz DDR4 - Gaming (W10)

  7. #7
    jun_tuko Guest
    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!!!

  8. #8
    Join Date
    Oct 2005
    Location
    CE(S)T
    Posts
    3,242
    Not sure, as I don't use it, but from a quick search this is what I found: to disable it
    Code:
    echo "0" >/selinux/enforce
    to re-enable it
    Code:
    echo "1" >/selinux/enforce
    or use the command
    Code:
    setenforce
    To check whether it is enabled, you can give the following command
    Code:
    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:
    Code:
    selinux=0
    But check this last option before actually implementing it, since (from what I read) it may bring undesired consequences.

    hth...
    Last edited by giulix; 8th November 2005 at 12:57 PM.
    Asus K55VD, i5 3230M - Productivity/Programming (F28)
    Asus M32CD - i7-6700, Asus STRIX-GTX970-DC2OC-4GD, 1x8 GB Sk Hynix 2133 MHz DDR4 - Gaming (W10)

  9. #9
    jun_tuko Guest
    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?

  10. #10
    DigitAl56K Guest

    Thumbs up SELinux issue

    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).

Similar Threads

  1. Apache HTTP web server 2.2.8 compile error
    By gully300 in forum Servers & Networking
    Replies: 1
    Last Post: 1st June 2008, 07:07 AM
  2. Apache error trying to start server.
    By Groundhog1248 in forum Servers & Networking
    Replies: 1
    Last Post: 18th June 2006, 04:57 PM
  3. Apache doesn't load pages
    By Mikha in forum Servers & Networking
    Replies: 3
    Last Post: 1st July 2005, 03:34 AM
  4. Load testing a the apache server??
    By drews project in forum Servers & Networking
    Replies: 4
    Last Post: 10th December 2004, 02:59 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •