Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jun 2007
    Location
    UK
    Posts
    9

    Question PHP not working

    I'm hosting a community website on a CentOS 5.5 x86_64 server. PHP is not working. Any attempt to access any php file on the main account gives a '500 Internal Server Error' and generates the following error log entry:

    Code:
    /usr/bin/php: error while loading shared libraries: librt.so.1: failed to map segment from shared object: Cannot allocate memory
    I've tried:

    1. Rebuilding apache and php with easyapache
    2. Updated cpanel
    3. reinstalled glibc (which contains librt)
    4. created a new cpanel account and installed a clean version of wordpress. Install fails with same errors as above.

    Any troubleshooting steps I can take?

  2. #2
    Member This forum account has been confirmed by cPanel staff to represent a vendor. syslint's Avatar
    Join Date
    Oct 2006
    Posts
    145

    Default Re: PHP not working

    Hello,

    It seems your glibc got corrupted, So 99% things won't work in your server . As a final way try to download the glibc rp from centos repo and install it ( chance it won't work ).

    Then proceed with OS reload .

  3. #3
    Member twhiting9275's Avatar
    Join Date
    Sep 2002
    Posts
    366
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: PHP not working

    Quote Originally Posted by pglock View Post
    Code:
    /usr/bin/php: error while loading shared libraries: librt.so.1: failed to map segment from shared object: Cannot allocate memory
    This error code right there says it all.
    The system has no problem finding the libraries. What the problem is, however, is very, very clearly stated in that error message.
    Code:
    Cannot allocate memory
    It would appear you've got no free memory on the server (or vps, etc). Try this:
    Code:
    free -m
    from inside the shell. this should tell you what you've got to work with. If you post the output of that here, you might get somewhere.

    Also, if you're losing memory like this, you want to try to free it up, either by rebooting, or finding out what the process that's eating your memory up is.
    Linux Tech Networks: Reliable Server Administration and Monitoring since 2002

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Nov 2006
    Location
    Lansing, Mi
    Posts
    19

    Default Re: PHP not working

    Quote Originally Posted by twhiting9275 View Post
    Also, if you're losing memory like this, you want to try to free it up, either by rebooting, or finding out what the process that's eating your memory up is.
    I'd recommend investigation before rebooting. When you run the 'free -m' also run a 'top', and use 'shift+M' to sort the process list by memory use. If you are hosting with a managed provider, you can also ask them to help you track it down.
    Benny Crampton
    Liquid Web || StormOnDemand
    1-800-580-4985 | Twitter: @liquidweb | @StormOnDemand

  5. #5
    Member
    Join Date
    Jun 2007
    Location
    UK
    Posts
    9

    Default Re: PHP not working

    an update:

    Thanks for all the advice. 'top' shows plenty of free memory so I looked for other things to help diagnose the problem.

    I can get php running by configuring it as a DSO, not through suPHP so I guess there is some problem with suPHP. I have checked permissions, all look ok. Any other ideas?

  6. #6
    Registered User
    Join Date
    Jul 2004
    Posts
    3

    Default Re: PHP not working

    Fixed problem.

    pico /usr/local/apache/conf/httpd.conf

    find line;

    RLimitMEM xxxxxx
    RLimitCPU xxx

    edit line;

    #RLimitMEM 67108864
    #RLimitCPU 240

Similar Threads & Tags
Similar threads

  1. Replies: 15
    Last Post: 08-15-2011, 01:27 PM
  2. php not working
    By samaanet in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-20-2011, 05:20 PM
  3. Fantastico not working: PHP not working in cPanel/WHM
    By softwareguy in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 05-25-2006, 02:38 AM
  4. PHP Update not working ( PHP version file is up to date )
    By ezztro in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 08-29-2005, 12:09 PM
  5. php suexec enabled and no php script working?!
    By torwill in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-07-2003, 08:47 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube