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.

suPHP Problem

Discussion in 'General Discussion' started by Technics, Dec 17, 2008.

  1. Technics

    Technics Member

    Joined:
    Apr 14, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I've got a really odd problem with suPHP, When I enable it I get memory problems - even though my php.ini is set to 256mb it's erroring on 6mb:

    PHP:
    [17-Dec-2008 19:58:05PHP Fatal error:  Out of memory (allocated 6553600) (tried to allocate 69768 bytesin /home/claret/public_html/global.php(612) : eval()'d code(998) : eval()'d code on line 61
    [17-Dec-2008 19:58:11PHP Fatal error:  Out of memory (allocated 6553600) (tried to allocate 491520 bytesin /home/claret/public_html/global.php(612) : eval()'d code on line 217
    [17-Dec-2008 19:58:12] PHP Fatal error:  Out of memory (allocated 6553600) (tried to allocate 491520 bytes) in /home/claret/public_html/global.php(612) : eval()'
    d code on line 217  
    I've got the following in my php.ini:

    PHP:
    error_reporting=E_ALL
    log_errors
    =On
    error_log
    ="/home/claret/phperrors.log"
    display_errors=On

    display_startup_errors 
    On
    memory_limit 
    256M
    upload_max_filesize 
    50M
    I've made sure my scripts are running correctly by doing the following:

    PHP:
       find /home/*/public_html -type d -exec chmod 755 {} \;
        find /home/*/
    public_html -name '*.php' --name '*.php[345]' --name '*.phtml'xargs chmod -v 644
    I've checked the directory permissions and file permissions in the cpanel file manager and they all match up.

    If I run under DSO the site works fine but under suPHP it breaks.

    Build information:

    PHP:
    cPanel 11.24.4-R32455 WHM 11.24.2 X 3.9
    CENTOS 5.2 x86_64

    php 
    -v
    PHP 5.2.8 
    (cli) (builtDec 17 2008 19:08:53)
    Copyright (c1997-2008 The PHP Group
    Zend Engine v2.2.0
    Copyright (c1998-2008 Zend Technologies
        with eAccelerator v0.9.5.3
    Copyright (c2004-2006 eAcceleratorby eAccelerator
        with the ionCube PHP Loader v3.1.33
    Copyright (c2002-2007by ionCube Ltd., and
        
    with Zend Extension Manager v1.2.2Copyright (c2003-2007by Zend Technologies
        with Suhosin v0.9.27
    Copyright (c2007by SektionEins GmbH
        with Zend Optimizer v3.3.3
    Copyright (c1998-2007by Zend Technologies


     
    If I run the script from the command line with suPHP enabled the script works fine, just errors through apache.
     
  2. bornonline

    bornonline Well-Known Member

    Joined:
    Nov 19, 2004
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    Have you checked to see if Suhosin memory limit is set?
    Not sure since it's working with DSO, but can't hurt to check I guess.
     
  3. Technics

    Technics Member

    Joined:
    Apr 14, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Got it working, after another update released by cPanel early yesterday evening and a rebuild of Apache using the same profile.
     
  4. qleb

    qleb Member

    Joined:
    Dec 31, 2008
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    yes i agree with you

    im facing this problem too in suphp

    the memory limit to 128M and problem on 8M

    u have to do somthing guys about this issue
     
  5. ksvendsen

    ksvendsen Registered

    Joined:
    Apr 2, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I am having the same problem.

    Very frustering, never got it working - have tried to recompile serveral times, even with different settings.

    When i switch to suPHP, it tries to allocate ~250mb, if i ask php how much it is allocating in peak it says ~8mb.. if i set the memory limit > 250 it is working, but there most be something wrong, having set a memory limit above 250mb for a php script is insane in an normally hosting enviroment.

    Looking very much forward to get the cpanel php set correctly up with suPHP!
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please check if you have rlimits set in Apache:

    Code:
    grep -i rlimit /usr/local/apache/conf/httpd.conf
    If there you see any RLimitMEM set in your httpd.conf, then comment out the line and restart Apache. At that point, re-try the site that wasn't working due to the memory errors to see if it begins working.
     
  7. chandro

    chandro Well-Known Member

    Joined:
    Nov 21, 2005
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    /home/chandro
    cPanel Access Level:
    Root Administrator
    that worked for me.

    #RLimitMEM 208782677

    even my RLimitMEM was high, i was getting the error Out of memory (allocated 6553600)
     
  8. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    To keep RLimitMEM removed from the httpd.conf file, you'll want to remove that line entirely then and then distill the changes to keep them going forward:

    Code:
    /usr/local/cpanel/bin/apache_conf_distiller --update
     
Loading...

Share This Page