Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast
Results 1 to 15 of 55
  1. #1
    Member
    Join Date
    May 2008
    Posts
    20

    Default suPHP and 500 Internal Server Errors

    I have used easyapache to compile latest apache 2.2 with php 5.2.6 and suphp. With PHP5 set to DSO in WHM, everything works fine. If I set it to suPHP, everything stops working.
    index.php
    Code:
    <?php phpinfo(); ?>
    in public_html returns a 500 error. public_html is 755, index.php is 644, and both are owned by my user:group. /usr/local/apache/logs/suphp_log contains only [info] lines, saying 'executing
    "/home/myuser/public_html/index.php" as UID 32007, GID 32009'. The UID and GID are correct for my user.
    Setting PHP5 back to DSO in WHM returns everything to working condition.
    The only suggestions for "fixes" I've found all assume that file/directory permissions are incorrect, which I've already checked. What else could cause the errors?
    Last edited by petteyg359; 08-14-2008 at 01:34 PM.

  2. #2
    Member
    Join Date
    May 2008
    Posts
    20

    Default

    Just noticed in /usr/local/apache/logs/error_log, when I turn on suPHP, I get the following on any attempt to execute a php page:
    Code:
    [Thu Aug 14 22:02:23 2008] [notice] caught SIGTERM, shutting down
    [Thu Aug 14 22:02:25 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
    [Thu Aug 14 22:02:25 2008] [notice] Digest: generating secret for digest authentication ...
    [Thu Aug 14 22:02:25 2008] [notice] Digest: done
    [Thu Aug 14 22:02:26 2008] [notice] mod_bw : Memory Allocated 0 bytes (each conf takes 32 bytes)
    [Thu Aug 14 22:02:26 2008] [notice] mod_bw : Version 0.8 - Initialized [0 Confs]
    [Thu Aug 14 22:02:26 2008] [notice] Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8b DAV/2 mod_bwlimited/1.4 configured -- resuming normal operations
    [Thu Aug 14 22:02:33 2008] [error] [client 70.248.122.48] /usr/bin/php: error while loading shared libraries: libaudit.so.0: failed to map segment from shared object: Cannot allocate memory
    [Thu Aug 14 22:02:33 2008] [error] [client 70.248.122.48] Premature end of script headers: phpinfo.php
    [Thu Aug 14 22:02:33 2008] [error] [client 70.248.122.48] File does not exist: /home/username/public_html/500.shtml
    That line with libaudit.so.0 looks like it might be my problem. Any idea where that's coming from, and anything I can set in EA3 to rebuild and fix it?

  3. #3
    Member
    Join Date
    Apr 2005
    Posts
    41

    Default

    This one looks like a memory problem, are you on a vps or on a dedicated server?

  4. #4
    Member
    Join Date
    May 2008
    Posts
    20

    Default

    This is on a VPS account with TekTonic. There is >768MB free (1.25GB total) RAM. On my previous EA3 build, the only thing obviously memory related enabled is mm.

  5. #5
    Member
    Join Date
    May 2008
    Posts
    20

    Default

    Rebuilt apache, this time with mm option disabled. Now I get

    [Sat Aug 16 01:11:11 2008] [error] [client 70.248.122.48] /usr/bin/php: error while loading shared libraries: libXau.so.6: failed to map segment from shared object: Cannot allocate memory
    [Sat Aug 16 01:11:11 2008] [error] [client 70.248.122.48] Premature end of script headers: index.php

    in /usr/local/apache/logs/error_log when attempting to load a page. This is happening on any PHP page, contents don't matter. I haven't attempted rebuilding with PHP 5.2.5 or earlier, yet (currently 5.2.6). Will attempt that next.

    EDIT: PHP 5.2.5 doesn't fix it, same error as above. Will try moving down to Apache 2.0 next (2.2 currently).
    Last edited by petteyg359; 08-16-2008 at 12:48 AM.

  6. #6
    Member hightekhosting's Avatar
    Join Date
    Aug 2007
    Posts
    27

    Default

    Ok, I've seen your issues before so I suggest you perform the following in SSH:

    Code:
    # /scripts/postsuexecinstall
    # /scripts/chownpublichtmls
    # cd /home 
    # find -perm 777 -exec chmod 755 {} \; -print
    # find -perm 666 -exec chmod 644 {} \; -print
    # /scripts/fixsuexeccgiscripts
    Perform each command one by one and see how that goes. It should reconfigure the home directories of the users as well as set any folder permissions to 755 and file permissions to 644.

    Everything should work after that

    Hope it helps.

    Regards,

    Dale Evans
    Manager
    Hightek Hosting
    Affordable cPanel & Plesk Website Hosting - 24/7 Sales & Support
    Ph: 1300 85 34 30- Engin VoIP Users Free Call: (02) 5908 2370 Fax: (02) 6971 1189
    Web: http://www.hightekhosting.com.au Email: sales@hightekhosting.com.au

  7. #7
    Member
    Join Date
    May 2008
    Posts
    20

    Default

    Still same error as my most recent post.

  8. #8
    Member
    Join Date
    Aug 2004
    Posts
    174

    Default

    Did you manage to resolve your issue?I just installed suPHP and every site even the ones installed with fantastico gives me a 500 error, any help will be appreciated.

  9. #9
    Member
    Join Date
    May 2008
    Posts
    20

    Default

    Nope. I'm starting to doubt that cPanel is compatible with suPHP.

  10. #10
    Member
    Join Date
    Aug 2004
    Posts
    174

    Default

    Well I managed to resolve almost every script with the suggestions given above and deleting any php_value on the .htacess files seems to work except I am having trouble with one particular script wich will not allow me to run without the php flag. I do not know how to put this to work with suPHP:

    php_value "magic_quotes_gpc" "1"
    php_value "register_globals" "1"
    php_value "error_reporting" "2039"

    If anyone can help me I would appreciate it a lot.

  11. #11
    Member
    Join Date
    Feb 2003
    Location
    Texas
    Posts
    73

    Default

    did you install fantasico with suexec enabled..might start there

  12. #12
    Member
    Join Date
    May 2008
    Posts
    20

    Default

    Quote Originally Posted by screege View Post
    php_value "magic_quotes_gpc" "1"
    php_value "register_globals" "1"
    php_value "error_reporting" "2039"

    If anyone can help me I would appreciate it a lot.
    Since I can't get suPHP to work for me, I can't give you the answer you're looking for, but I can say that any script that needs register_globals should be replaced.

  13. #13
    Member
    Join Date
    Jul 2003
    Posts
    111

    Default

    I’ve did a quick search on Google and found this ‘Use custom php.ini file with suPHP’ and which might help you with your issue.

    http://www.watters.ws/wiki/index.php...ile_with_suPHP

  14. #14
    Member
    Join Date
    Aug 2004
    Posts
    174

    Default

    thanks a lot it works like a charm.

  15. #15
    Member
    Join Date
    May 2008
    Posts
    20

    Default

    Just started again on a clean new install of cPanel. Used easyapache with Apache 2.0, PHP 5.2.5, this config:

    Code:
    ---
    Apache:
      optmods:
        Access: 1
        Actions: 1
        Alias: 1
        Asis: 0
        AuthAnon: 0
        AuthDB: 0
        AuthDBM: 0
        AuthDigest: 0
        AuthLDAP: 0
        AuthnAlias: 0
        AuthnAnon: 0
        AuthnDBD: 0
        AuthnDBM: 0
        AuthnDefault: 1
        AuthnzLDAP: 0
        AuthzDBM: 0
        AuthzHost: 1
        AuthzOwner: 0
        Autoindex: 1
        Bucketeer: 0
        Cache: 0
        CaseFilter: 0
        CaseFilterIn: 0
        CernMeta: 0
        CharsetLite: 0
        DAVFs: 0
        DAVLock: 0
        DBD: 0
        DIR: 1
        Dav: 0
        Deflate: 1
        DiskCache: 0
        Distcache: 0
        Dumpio: 0
        Echo: 0
        Env: 0
        Expires: 1
        ExtFilter: 0
        Fastcgi: 1
        FileCache: 0
        Fileprotect: 1
        Frontpage: 0
        Headers: 1
        Ident: 0
        Imagemap: 0
        LDAP: 0
        LogAgent: 0
        LogConfig: 1
        LogForensic: 0
        LogReferer: 0
        MPMEvent: 0
        MPMLeader: 0
        MPMPerchild: 0
        MPMPrefork: 1
        MPMThreadpool: 0
        MPMWorker: 0
        MemCache: 0
        Mime: 1
        MimeMagic: 0
        MmapStatic: 0
        Negotiation: 1
        OptionalFnExport: 0
        OptionalFnImport: 0
        OptionalHookExport: 0
        OptionalHookImport: 0
        PHPAsUser: 1
        Proxy: 1
        RaiseFDSetsize: 0
        RaiseHardServerLimit: 0
        Rewrite: 0
        Setenvif: 1
        Speling: 0
        Status: 1
        UniqueId: 0
        Userdir: 1
        Usertrack: 0
        Version: 0
        VhostAlias: 0
      version: 2
    Cpanel::Easy::EAccelerator: 0
    Cpanel::Easy::IonCubeLoader: 0
    Cpanel::Easy::ModBandwidth: 1
    Cpanel::Easy::ModGzip: 0
    Cpanel::Easy::ModJk5: 0
    Cpanel::Easy::ModMono: 0
    Cpanel::Easy::ModPerl: 0
    Cpanel::Easy::ModSec: 0
    Cpanel::Easy::PHP4: 0
    Cpanel::Easy::PHP4::4_4: 0
    Cpanel::Easy::PHP4::4_5: 0
    Cpanel::Easy::PHP4::4_6: 0
    Cpanel::Easy::PHP4::4_7: 0
    Cpanel::Easy::PHP4::4_8: 0
    Cpanel::Easy::PHP4::4_9: 0
    Cpanel::Easy::PHP4::Bcmath: 0
    Cpanel::Easy::PHP4::Bz2: 0
    Cpanel::Easy::PHP4::CGI: 0
    Cpanel::Easy::PHP4::Calendar: 0
    Cpanel::Easy::PHP4::Concurrent: 0
    Cpanel::Easy::PHP4::Curl: 0
    Cpanel::Easy::PHP4::CurlSSL: 0
    Cpanel::Easy::PHP4::DBX: 0
    Cpanel::Easy::PHP4::Dbase: 0
    Cpanel::Easy::PHP4::DiscardPath: 0
    Cpanel::Easy::PHP4::DomXslt: 0
    Cpanel::Easy::PHP4::Exif: 0
    Cpanel::Easy::PHP4::FTP: 0
    Cpanel::Easy::PHP4::Fastcgi: 0
    Cpanel::Easy::PHP4::ForceCGIRedirect: 0
    Cpanel::Easy::PHP4::GD: 0
    Cpanel::Easy::PHP4::Gettext: 0
    Cpanel::Easy::PHP4::HardPHP: 0
    Cpanel::Easy::PHP4::Iconv: 0
    Cpanel::Easy::PHP4::Imap: 0
    Cpanel::Easy::PHP4::Java: 0
    Cpanel::Easy::PHP4::MM: 0
    Cpanel::Easy::PHP4::MagicQuotes: 0
    Cpanel::Easy::PHP4::MailHeaders: 0
    Cpanel::Easy::PHP4::Mbregex: 1
    Cpanel::Easy::PHP4::Mbstring: 0
    Cpanel::Easy::PHP4::Mcrypt: 0
    Cpanel::Easy::PHP4::MemoryLimit: 0
    Cpanel::Easy::PHP4::Mhash: 0
    Cpanel::Easy::PHP4::MimeMagic: 0
    Cpanel::Easy::PHP4::Ming: 0
    Cpanel::Easy::PHP4::MysqlOfSystem: 0
    Cpanel::Easy::PHP4::Openssl: 0
    Cpanel::Easy::PHP4::PDFLib: 0
    Cpanel::Easy::PHP4::POSIX: 1
    Cpanel::Easy::PHP4::PathInfoCheck: 1
    Cpanel::Easy::PHP4::PcreRegex: 1
    Cpanel::Easy::PHP4::Pear: 1
    Cpanel::Easy::PHP4::Pgsql: 0
    Cpanel::Easy::PHP4::Pspell: 0
    Cpanel::Easy::PHP4::SNMP: 0
    Cpanel::Easy::PHP4::SafeMode: 0
    Cpanel::Easy::PHP4::SafePHPCGI: 0
    Cpanel::Easy::PHP4::Sockets: 0
    Cpanel::Easy::PHP4::Swf: 0
    Cpanel::Easy::PHP4::TTF: 0
    Cpanel::Easy::PHP4::Versioning: 0
    Cpanel::Easy::PHP4::Wddx: 0
    Cpanel::Easy::PHP4::XmlRPC: 0
    Cpanel::Easy::PHP4::XsltSablot: 0
    Cpanel::Easy::PHP4::ZendMultibyte: 0
    Cpanel::Easy::PHP4::Zip: 0
    Cpanel::Easy::PHP4::Zlib: 0
    Cpanel::Easy::PHP5: 1
    Cpanel::Easy::PHP5::2_3: 0
    Cpanel::Easy::PHP5::2_4: 0
    Cpanel::Easy::PHP5::2_5: 1
    Cpanel::Easy::PHP5::2_6: 0
    Cpanel::Easy::PHP5::Bcmath: 1
    Cpanel::Easy::PHP5::Bz2: 1
    Cpanel::Easy::PHP5::CGI: 0
    Cpanel::Easy::PHP5::Calendar: 1
    Cpanel::Easy::PHP5::Concurrent: 0
    Cpanel::Easy::PHP5::Curl: 1
    Cpanel::Easy::PHP5::CurlSSL: 1
    Cpanel::Easy::PHP5::Curlwrappers: 1
    Cpanel::Easy::PHP5::DBX: 0
    Cpanel::Easy::PHP5::Dbase: 0
    Cpanel::Easy::PHP5::DiscardPath: 0
    Cpanel::Easy::PHP5::Exif: 1
    Cpanel::Easy::PHP5::FTP: 1
    Cpanel::Easy::PHP5::Fastcgi: 0
    Cpanel::Easy::PHP5::ForceCGIRedirect: 0
    Cpanel::Easy::PHP5::GD: 1
    Cpanel::Easy::PHP5::Gettext: 1
    Cpanel::Easy::PHP5::HardPHP: 0
    Cpanel::Easy::PHP5::Iconv: 0
    Cpanel::Easy::PHP5::Imap: 1
    Cpanel::Easy::PHP5::Java: 0
    Cpanel::Easy::PHP5::MM: 1
    Cpanel::Easy::PHP5::MagicQuotes: 1
    Cpanel::Easy::PHP5::MailHeaders: 0
    Cpanel::Easy::PHP5::Mbregex: 0
    Cpanel::Easy::PHP5::Mbstring: 1
    Cpanel::Easy::PHP5::Mcrypt: 1
    Cpanel::Easy::PHP5::MemoryLimit: 0
    Cpanel::Easy::PHP5::Mhash: 1
    Cpanel::Easy::PHP5::MimeMagic: 0
    Cpanel::Easy::PHP5::Ming: 0
    Cpanel::Easy::PHP5::Mysql: 1
    Cpanel::Easy::PHP5::MysqlOfSystem: 1
    Cpanel::Easy::PHP5::Mysqli: 1
    Cpanel::Easy::PHP5::Openssl: 1
    Cpanel::Easy::PHP5::PDFLib: 0
    Cpanel::Easy::PHP5::PDO: 0
    Cpanel::Easy::PHP5::PDOMySQL: 0
    Cpanel::Easy::PHP5::POSIX: 0
    Cpanel::Easy::PHP5::PathInfoCheck: 0
    Cpanel::Easy::PHP5::Pear: 0
    Cpanel::Easy::PHP5::Pgsql: 0
    Cpanel::Easy::PHP5::Pspell: 0
    Cpanel::Easy::PHP5::SNMP: 0
    Cpanel::Easy::PHP5::SOAP: 0
    Cpanel::Easy::PHP5::SafeMode: 0
    Cpanel::Easy::PHP5::SafePHPCGI: 0
    Cpanel::Easy::PHP5::Sockets: 1
    Cpanel::Easy::PHP5::Swf: 0
    Cpanel::Easy::PHP5::TTF: 1
    Cpanel::Easy::PHP5::Tidy: 1
    Cpanel::Easy::PHP5::Versioning: 0
    Cpanel::Easy::PHP5::Wddx: 0
    Cpanel::Easy::PHP5::WithoutIconv: 0
    Cpanel::Easy::PHP5::XSL: 0
    Cpanel::Easy::PHP5::XmlRPC: 0
    Cpanel::Easy::PHP5::XsltSablot: 0
    Cpanel::Easy::PHP5::ZendMultibyte: 0
    Cpanel::Easy::PHP5::Zip: 0
    Cpanel::Easy::PHP5::Zlib: 1
    Cpanel::Easy::PHP5::cPPHPOpts: 0
    Cpanel::Easy::PHPSuHosin: 1
    Cpanel::Easy::SourceGuardian: 0
    Cpanel::Easy::Zendopt: 0
    _meta:
      implies:
        changed:
          Cpanel::Easy::PHP4::CGI:
            changed_by: Cpanel::Easy::Apache::PHPAsUser
            changed_to: 0
        circles: {}
    
      name: suPHP Test 1
      note: Config attempting to achieve working suPHP. Apache 2.0, PHP 5.2.5, etc. 10/14/2008 20:35 CST.
      revision: _4qY7xLMwuPpiVabzCsTf_JOs1GBwUbsvKdRPtQtsG0TmTvxYzWEMhOAxQIeEVZq
    Amazingly enough, things seem to be working so far, but all I've tested is a simple echo 'hello world'; and phpinfo();. Appears the incompatibility is Apache 2.2... While searching Google on this issue and reading various tips and such, several places say that cPanel, rather than using suPHP 0.6.2, uses 0.6.1 with a cPanel-supplied patch that is supposed to be equivalent to 0.6.2. Considering that 0.6.2 is the version of suPHP that adds Apache 2.2 support... 0.6.3 has been out since March, so I really hope cPanel isn't still using 0.6.1 (or their 0.6.2 equivalent). Anybody have a working Apache 2.2 cPanel host with suPHP working?
    Last edited by petteyg359; 10-14-2008 at 09:49 PM.

+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast
Similar Threads & Tags
Similar threads

  1. suphp+ssl = 500 internal server error
    By backtogeek in forum New User Questions
    Replies: 9
    Last Post: 08-06-2010, 10:30 PM
  2. Setting shared SSL when using suPHP cause 500 Internal Server Error
    By markhard in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-06-2010, 02:13 AM
  3. 500 Internal Server Errors all of a sudden
    By fishfreek in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 04-16-2009, 04:54 PM
  4. 500 internal server errors -- help
    By aingaranweb in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-28-2005, 04:05 PM
  5. Mailing list gives 500 Internal Server errors?
    By fog in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-30-2003, 02:42 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube