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.

php segmentation fault

Discussion in 'General Discussion' started by PondRicefied, Feb 21, 2007.

Thread Status:
Not open for further replies.
  1. PondRicefied

    PondRicefied Well-Known Member

    Joined:
    Dec 13, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    A php script outputs 500 errors by the fault of segmentation.

    I upgraded to php4.4.5. Then, the following errors are outputted to an Apache's log.

    ---
    Premature end of script headers: /home/xxx/public_html/xxx.php
    ---

    The output of gdb is as follows.

    ---
    $ gdb /usr/bin/php (cgi)
    GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

    (gdb) run /home/xxx/public_html/xxx.php
    Starting program: /usr/bin/php /home/xxx/public_html/xxx.php
    [Thread debugging using libthread_db enabled]
    [New Thread -1208052352 (LWP 28659)]

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread -1208052352 (LWP 28659)]
    0x0812b178 in php_add_session_var (name=0x8617d3c "login", namelen=5)
    at /home/cpapachebuild/buildapache/php-4.4.5/ext/session/session.c:287
    287 if ((Z_TYPE_PP(sym_global) == IS_ARRAY && Z_ARRVAL_PP(sym_global) == &EG(symbol_table)) || *sym_global == PS(http_session_vars)) {

    (gdb) run -n /home/xxx/public_html/xxx.php
    ...
    Program exited normally.

    (gdb) run -c /usr/local/Zend/etc/php.ini /home/xxx/public_html/xxx.php
    Starting program: /usr/bin/php -c /usr/local/Zend/etc/php.ini /home/xxx/public_html/xxx.php
    [Thread debugging using libthread_db enabled]
    [New Thread -1209010816 (LWP 28781)]

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread -1209010816 (LWP 28781)]
    0x0812b178 in php_add_session_var (name=0x890082c "login", namelen=5)
    at /home/cpapachebuild/buildapache/php-4.4.5/ext/session/session.c:287
    287 if ((Z_TYPE_PP(sym_global) == IS_ARRAY && Z_ARRVAL_PP(sym_global) == &EG(symbol_table)) || *sym_global == PS(http_session_vars)) {

    (gdb) quit
    ---

    This error seems to generate in a specific php script.
    When session data is stored in MySQL using session_set_save_handler etc.

    How can I fix this problem?
     
  2. arhs

    arhs Well-Known Member

    Joined:
    Jul 4, 2003
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
  3. niatech

    niatech Well-Known Member

    Joined:
    Feb 20, 2005
    Messages:
    121
    Likes Received:
    0
    Trophy Points:
    16
    Interesting, I've been having a problem with other applications on our servers as well after the upgrade. I'm trying to downgrade now to 4.4.4 and see if that fixed the issue until PHP releases a bugfix.
     
  4. PondRicefied

    PondRicefied Well-Known Member

    Joined:
    Dec 13, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Thank you for reply.

    I also use 4.4.4 until php releases bug fix.
     
  5. niatech

    niatech Well-Known Member

    Joined:
    Feb 20, 2005
    Messages:
    121
    Likes Received:
    0
    Trophy Points:
    16
    FYI, Just finished downgrading to 4.4.4 on one of the affected servers and it seemed to fix the issue.

    Everyone might want to hold off on 4.4.5 until PHP has released an update.
     
  6. JamesSmith

    JamesSmith Well-Known Member

    Joined:
    Sep 17, 2003
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK, Luton
Loading...
Thread Status:
Not open for further replies.

Share This Page