Find the answer to your Linux question:
Results 1 to 8 of 8
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]# ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Location
    UK
    Posts
    77

    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
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    Did you try re-compiling apache? I believe the module is created on Apache's compile rather than php's.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  3. #3
    Just Joined!
    Join Date
    Jun 2005
    Posts
    3

    SELinux

    The problem is not your config or the compiling of Apache. I have the same problem and I am able to get everything working if I disable SELinux. As of yet I still have not found a work around without disabling SELinux.

  4. #4
    Just Joined!
    Join Date
    Jan 2005
    Location
    UK
    Posts
    77
    yep too true im afraid. Disabling SELinux was the only way forward. The bad news is, it isnt fixed in FC4

  5. #5
    Just Joined!
    Join Date
    Jun 2005
    Posts
    3

    FC4 PHP APCHE MOD_SSL

    I figured it out, I am able to now leave SELinux on. If you go to the directory were the permissions are denied and type “ls –lcontext” 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.

  6. #6
    Just Joined!
    Join Date
    Jan 2005
    Location
    UK
    Posts
    77
    sounds good to me jecker! I'll try it later and let you know how i get on.

  7. #7
    Just Joined!
    Join Date
    Jun 2005
    Posts
    3

    SELinux

    FYI this command "ls --lcontext" is LS --LCONTEXT in lower case. This command will show you the additional permissions provided by SELinux.

  8. #8
    Just Joined!
    Join Date
    Jan 2005
    Location
    UK
    Posts
    77
    works a treat!! Thanks a lot

Posting Permissions

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