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.

Easyapache: httpd failed when upgrading to PHP5

Discussion in 'EasyApache' started by headout, Oct 20, 2007.

  1. headout

    headout Well-Known Member

    Joined:
    Aug 20, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    we tried to upgrade our PHP version from 4.4.7 to 5.2.4. The upgrade seems succesfull, but httpd doesn't come up. It fails, even with a restart through SSH.

    WHM 11.11.0 cPanel 11.15.0-R17665

    s03# /usr/local/apache/bin/apachectl configtest
    Syntax OK

    No specific errors in the Apache error log.

    A downgrade tot PHP4 is necessary to let Apache restart.
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Did non-php sites come up? Depending on whether you are running suexec / suphp or not, you should also check all of the following logs:

    /usr/local/apache/logs/error_log
    /usr/local/apache/logs/suexec_log
    /usr/local/apache/logs/suphp_log
    /usr/local/apache/logs/audit.log (if running mod_security)
    /usr/local/apache/domlogs/nameofdomain.ext (obviously replace that)

    And check /var/log/messages

    There are definitely going to be errors _somewhere_, in at least _one_ of those files. And without reading the errors you'll probably never know why it didn't come up.

    If it was specific to just PHP sites, it probably was an issue with AddType / AddHandler lines in php.conf or something.

    Mike
     
  3. headout

    headout Well-Known Member

    Joined:
    Aug 20, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    No, none of them did.

    We're going to give it a try in few days and will look in all the mentioned log files.
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Are you using any 3rdparty PHP extensions, such as Zend Opt or Ion Cube ?
     
  5. headout

    headout Well-Known Member

    Joined:
    Aug 20, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Today httpd failed, and trying to restart through ssh: failed.
    The apache errorlog show us nothing more then:
    [Thu Oct 25 13:40:00 2007] [notice] mod_security/1.9.5 configured
    [Thu Oct 25 13:40:01 2007] [notice] mod_security/1.9.5 configured
    [Thu Oct 25 13:40:29 2007] [notice] mod_security/1.9.5 configured
    [Thu Oct 25 13:41:01 2007] [notice] mod_security/1.9.5 configured
    [Thu Oct 25 13:41:02 2007] [notice] mod_security/1.9.5 configured

    The other logs are empty or don't show important messages.

    In /var/log/messages we see this:
    Oct 25 13:18:40 s03 kernel: pid 93646 (httpd), uid 0: exited on signal 11 (core dumped)

    When we downgrade to PHP4, hhtpd restarts.
    When we use these settings:
    Default PHP Version (.php files) 5
    PHP 5 Handler cgi
    PHP 4 Handler dso
    Suexec off
    It all works fine.

    But switching back to PHP5 as dso and PHP as cgi, httpd fails and showing us the same errors as above.
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    What happens when you execute PHP 5 via the command line? e.g. /usr/bin/php or /usr/bin/local/bin/php

    Don't pass any parameters/flags, just execute the command. If it returns immediately, then something is likely causing a seg fault. If the system waits for extra info, then the binary and it's libraries are likely fine. Returns immediately means after typing /usr/bin/php and hitting enters, the command prompt re-appears. If the command prompt does not re-appear without depressing CTRL+C then the binary should be fine.

    If you are using any 3rdpary extensions: Zend Opt, Ion Cube, eAccelerator, try disabling them.

    Which version of Apache are you using?
     
  7. headout

    headout Well-Known Member

    Joined:
    Aug 20, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Indeed, that happens. I need to press ctrl + F5 to get the prompt back.

    Apache version: 1.3.39; we run PHP with the Zend Engine.
     
  8. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Did you examine the core dump?

    PM me the output of php -i (or phpinfo() ) and I'll examine it for any oddities.

    We might need to have you open a support ticket at https://tickets.cpanel.net/submit/ to get full resolution.
     
  9. Lestat

    Lestat Well-Known Member

    Joined:
    Sep 13, 2003
    Messages:
    199
    Likes Received:
    0
    Trophy Points:
    16
    /usr/local/apache/logs/error_log
    [Wed Nov 14 15:40:04 2007] [emerg] (43)Identifier removed: couldn't grab the accept mutex
    [Wed Nov 14 15:40:04 2007] [emerg] (43)Identifier removed: couldn't grab the accept mutex
    [Wed Nov 14 15:40:04 2007] [emerg] (43)Identifier removed: couldn't grab the accept mutex
    [Wed Nov 14 15:40:04 2007] [emerg] (43)Identifier removed: couldn't grab the accept mutex
    [Wed Nov 14 15:40:04 2007] [emerg] (43)Identifier removed: couldn't grab the accept mutex
    [Wed Nov 14 15:40:04 2007] [emerg] (43)Identifier removed: couldn't grab the accept mutex
    [Wed Nov 14 15:40:04 2007] [emerg] (43)Identifier removed: couldn't grab the accept mutex
    [Wed Nov 14 15:40:05 2007] [emerg] (22)Invalid argument: couldn't release the accept mutex
    [Wed Nov 14 15:40:05 2007] [alert] Child 5817 returned a Fatal error... Apache is exiting!
    [Wed Nov 14 15:40:09 2007] [emerg] (22)Invalid argument: couldn't grab the accept mutex
    [Wed Nov 14 15:40:12 2007] [emerg] (22)Invalid argument: couldn't grab the accept mutex
    [Wed Nov 14 15:44:10 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
    [Wed Nov 14 15:44:10 2007] [notice] ModSecurity for Apache 2.1.3 configured
    [Wed Nov 14 15:44:11 2007] [notice] mod_bw : Memory Allocated 0 bytes (each conf takes 28 bytes)
    [Wed Nov 14 15:44:11 2007] [notice] mod_bw : Version 0.8 - Initialized [0 Confs]
    [Wed Nov 14 15:44:11 2007] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Wed Nov 14 15:44:11 2007] [notice] Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7a mod_bwlimited/1.4 mod_auth_passthrough/2.1 FrontPage/5.0.2.2635 configured -- resuming normal operations



    My httpd crashes about every 2-3 hours..... not sure what is causing it..
     
  10. Bulent Tekcan

    Bulent Tekcan Well-Known Member

    Joined:
    May 11, 2004
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    16
    Same problem here sometimes I see in this error my logs

    [emerg] (22)Invalid argument: couldn't grab the accept mutex

    When I update apache to 2.2.6 this problem started.I never see any error apache 1.3.x

    Any idea ?
     
Loading...

Share This Page