Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

ini_set or htaccess memory_limit kills php processing

Discussion in 'General Discussion' started by mrlugal, Dec 21, 2010.

  1. mrlugal

    mrlugal Registered

    Joined:
    Dec 24, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    151
    Any ideas or help here would be much appreciated!

    I updated PHP/Apache last night and any site that has either:
    ini_set(memory_limit) or an
    htaccess php_value memory_limit

    (Any other ini_set or php_value settings are still fine)

    command does not process any php files and returns page cannot be displayed 0 bytes from the browser. I thought it might have been something with suHosin at first but haven't had any luck with it.

    Is there a default setting that I might be missing or security option somewhere?


    PHP config --
    './configure' '--enable-bcmath' '--enable-calendar' '--enable-discard-path' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-sockets' '--prefix=/usr/local' '--with-apxs=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-jpeg-dir=/usr' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mhash=/opt/mhash/' '--with-mm=/opt/mm/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-png-dir=/usr' '--with-pspell' '--with-sqlite=shared' '--with-ttf' '--with-xpm-dir=/usr/X11R6' '--with-zlib' '--with-zlib-dir=/usr'
     
  2. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    166
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,554
    Likes Received:
    9
    Trophy Points:
    168
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    What was the prior PHP version? What is the new PHP version installed?

    I would save a backup of and then reset the main PHP configuration file(s), named php.ini, using the following commands (entered in the order listed):
    Code:
    # mv -v /usr/local/lib/php.ini /usr/local/lib/php.ini.backup
    # mv -v /usr/local/php4/lib/php.ini /usr/local/php4/lib/php.ini.backup
    # /scripts/phpini
    Here is an example of what the output may look like (assuming both PHP5 and PHP4 are installed):
    Code:
    # mv -v /usr/local/lib/php.ini /usr/local/lib/php.ini.backup
    `/usr/local/lib/php.ini' -> `/usr/local/lib/php.ini.backup'
    # mv -v /usr/local/php4/lib/php.ini /usr/local/php4/lib/php.ini.backup
    `/usr/local/php4/lib/php.ini' -> `/usr/local/php4/lib/php.ini.backup'
    # /scripts/phpini
    Updating php.ini for /usr/local ...Done
    Updating php.ini for /usr/local/php4 ...Done
    Updated php.ini default values to version 3.3
    Restarting Apache
    info [safeapacherestart] Restart elapsed seconds: 1
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. mrlugal

    mrlugal Registered

    Joined:
    Dec 24, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    151
    Thanks for the feedback!

    Yep I tried suhosin setting both to zero or a large number to see if it was killing the scripts.

    The PHP version was the same (5.2.9), don't have php4 setup, I just recompiled adding PDO extensions using easy apache.

    I tried the /scripts/phpini command but it didn't return any output.
     
  5. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,554
    Likes Received:
    9
    Trophy Points:
    168
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Did you rename, i.e., move, the existing PHP configuration "php.ini" file so that a freshly reset php.ini could be installed? A new copy of the main php.ini will only be written if it does not already exist.

    I recommend upgrading PHP to a newer version (e.g., PHP 5.2.15); it is entirely possible that using an old version may exacerbate any issues, making it more difficult to diagnose, investigate and resolve.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice