The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP not working

Discussion in 'General Discussion' started by pglock, Dec 28, 2010.

  1. pglock

    pglock Member

    Joined:
    Jun 14, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    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. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    249
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    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. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
  4. LiquidWebBenny

    PartnerNOC

    Joined:
    Nov 3, 2006
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Lansing, Mi
    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.
     
  5. pglock

    pglock Member

    Joined:
    Jun 14, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    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. pasa

    pasa Registered

    Joined:
    Jul 20, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Fixed problem.

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

    find line;

    RLimitMEM xxxxxx
    RLimitCPU xxx

    edit line;

    #RLimitMEM 67108864
    #RLimitCPU 240
     
Loading...

Share This Page