FedoraForum.org - Fedora Support Forums and Community
Results 1 to 9 of 9
  1. #1
    hdcleaver Guest

    Problem starting apache with PHP

    This morning i had a power cut which has thrown my apache and php configuration out of the window! Upon restarting apache i get the following error message:

    [root@server apache2]# bin/apachectl start
    Syntax error on line 148 of /usr/local/apache2/conf/httpd.conf:
    Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied


    I have tried doing a recompile of php but it still gives this message. Also tried removing the reference to the php module from the httpd.conf and it starts up with no problems (obviously without php).

    If anyone could help would be appreciated so i can minimise my downtime.

    thanks.

  2. #2
    LLS Guest
    You must have just updated SElinux targeted. I did and now I have the same errors on Apache, clamav and I imagine PHP. We have to find some other solution orther than the standard disable SElinux that is floating around.
    "cannot restore segment prot after reloc: Permission denied"

  3. #3
    LLS Guest
    Found this---
    https://bugzilla.redhat.com/bugzilla....cgi?id=153146
    Can someone tell me how to revert to the previous SElinux using rpm?

  4. #4
    hdcleaver Guest
    ah yes, i did a kernel update about a month ago and this is the first time i restarted since it was updated. I'm going to have to disable SELinux for the time being, i will be upgrading to FC4 in a few days when my new hdd arrives so hopefully it will be sorted in FC4.

  5. #5
    LLS Guest
    Yeah I had to disable enforcing to get things working again. Fingers crossed for FDC4!!!

  6. #6
    hdcleaver Guest
    It works disabling SELinux, i just wish i didnt have to do that to get it working though. Hopefully when i get FC4 on my server all will be well again!

  7. #7
    jecker Guest
    I figured out the permissions problem. If you go to the directory were the permissions are denied and type “ls –-lcontext”, "LS --LCONTEXT" in lower case, this will show you the additional permissions applied. To fix the problem go to the directory of the files having permission problems and type “chcon <filename> -t shlib_t” This will give apache the permissions it needs to run those files.

  8. #8
    LLS Guest
    One would presume then that SElinux is on , and I upgrade,install or move a program , then it will not have the correct permissions "contexts" untill they are manually added with the chcon comand? can you use the restorecon -v -R /var/lib/php?

  9. #9
    coco Guest

    Thumbs up God bless you Jecker!

    Hi Jecker,
    I would just like to thank you very much for posting your experince, I have saved a lot of time by implementing it for solving the same problem here...
    Good luck!

Similar Threads

  1. Problem with starting Apache on port 80
    By elliott_1951 in forum Servers & Networking
    Replies: 1
    Last Post: 29th April 2007, 12:41 AM
  2. apache not starting
    By ba747heavy in forum Servers & Networking
    Replies: 4
    Last Post: 20th September 2005, 05:51 PM
  3. Starting Apache problem
    By scrum in forum Using Fedora
    Replies: 3
    Last Post: 23rd August 2005, 02:24 PM
  4. apache fc3 questions: starting apache & file permissions
    By mexicoshanty in forum Servers & Networking
    Replies: 2
    Last Post: 16th June 2005, 07:56 AM
  5. Problem starting Apache
    By Phishhead in forum Using Fedora
    Replies: 6
    Last Post: 3rd December 2004, 11:01 PM

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
  •