Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    1

    Default Memory issues when PHP is running as suPHP

    I am getting this error when PHP is running as suPHP. It is OK when PHP is configured to run as DSO.

    ========================================
    [Sat Oct 17 11:27:38 2009] [error] [client xxx.xxx.xxx.xxx] Failed loading /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so: /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so: failed to map segment from shared object: Cannot allocate memory
    ========================================

    Could anyone please help me to find what could be causing this.

    Any help in troubleshooting the problem is highly appreciated.

    Many Thanks,
    Sherin

  2. #2
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Lightbulb

    What is your PHP version?

    If possible, please provide the output from the following commands (via root SSH access):
    Code:
    # /usr/local/cpanel/bin/rebuild_phpconf --current
    # /usr/local/bin/php -v
    # /usr/local/bin/php -i | grep configure
    Zend Optimizer has known issues with certain newer versions of PHP, including PHP v5.2.10 and v5.2.11; for better compatibility with Zend Optimizer a safe PHP version to revert to (via EasyApache) is PHP v5.2.9.

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jul 2003
    Posts
    129

    Default

    Several of our servers started giving the 500 internal server errors on all php sites. In the logs, the above error showed. The results of the commands are:

    root@lamp [~]# /usr/local/cpanel/bin/rebuild_phpconf --current
    Available handlers: suphp dso cgi none
    DEFAULT PHP: 5
    PHP4 SAPI: suphp
    PHP5 SAPI: suphp
    SUEXEC: enabled
    root@lamp [~]#
    root@lamp [~]# /usr/local/bin/php -v
    PHP 5.2.11 (cli) (built: Oct 28 2009 07:02:16)
    Copyright (c) 1997-2009 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
    with the ionCube PHP Loader v3.3.7, Copyright (c) 2002-2009, by ionCube Ltd., and
    with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
    with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies
    root@lamp [~]# /usr/local/bin/php -i | grep configure
    Configure Command => './configure' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-wddx' '--enable-zend-multibyte' '--enable-zip' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mhash=/opt/mhash/' '--with-mime-magic' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pgsql=/usr' '--with-pic' '--with-png-dir=/usr' '--with-pspell' '--with-sqlite=shared' '--with-tidy=/opt/tidy/' '--with-ttf' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'


    So you are saying that switching to 5.2.9 may resolve the issue?
    Arvixe - Freedom of the web at your fingertips

  4. #4
    Member
    Join Date
    May 2008
    Posts
    1,203

    Default

    Please make sure that you have assigned 644 permission to your .php files and also make sure that there is no php functions assigned in your .htaccess file.

  5. #5
    Member ModServ's Avatar
    Join Date
    Oct 2006
    Location
    Egypt
    Posts
    228
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Also check the size of suphp_log file located in /usr/local/apache/logs if it was 2GB then you should rotate it.

    ModServ for Hosting & Web Services Solutions
    URL: http://www.modserv.com.eg

  6. #6
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by Arvand View Post
    Several of our servers started giving the 500 internal server errors on all php sites. In the logs, the above error showed. The results of the commands are:

    Code:
    root@lamp [~]# /usr/local/bin/php -v
    PHP 5.2.11 (cli) (built: Oct 28 2009 07:02:16)
    Copyright (c) 1997-2009 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
        with the ionCube PHP Loader v3.3.7, Copyright (c) 2002-2009, by ionCube Ltd., and
        with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
        with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies
    So you are saying that switching to 5.2.9 may resolve the issue?
    I would re-install Zend Optimizer; thee is a newer version that should work better with PHP up to version 5.2.12, as seen below:
    Code:
    # /usr/local/bin/php -v
    PHP 5.2.12 (cli) (built: Jan 19 2010 17:10:33) 
    Copyright (c) 1997-2009 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
        with the ionCube PHP Loader v3.3.7, Copyright (c) 2002-2009, by ionCube Ltd., and
        with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies
        with Suhosin v0.9.29, Copyright (c) 2007, by SektionEins GmbH
    Here are two commands that may be used to remove and then re-install Zend Optimizer in PHP:
    Code:
    # /scripts/phpextensionmgr uninstall Zendopt
    # /scripts/phpextensionmgr install Zendopt

Similar Threads & Tags
Similar threads

  1. Issues with cpanel VPS running out of memory/crashing
    By M001 in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 10-05-2011, 12:43 AM
  2. Memory issue running PHP scripts from Jailshell account
    By Sindre in forum cPanel and WHM Discussions
    Replies: 12
    Last Post: 08-09-2011, 10:37 AM
  3. Owner on public_html running SUPHP
    By jeroman8 in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 03-02-2009, 03:31 AM
  4. Any issues with compiling PHP with "Memory Limit" option?
    By nothsa in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-11-2006, 10:25 PM
  5. Running SuPHP and mod_php on 1 server
    By jamesbond in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-23-2004, 03:15 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube