|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61325 FastCGI keeps dieing
Submitted: 2012-03-08 12:36 UTC Modified: 2012-09-18 20:29 UTC
Avg. Score:4.6 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:5 (71.4%)
Same OS:3 (42.9%)
From: Alastair at adewra dot com Assigned:
Status: Duplicate Package: CGI/CLI related
PHP Version: 5.4.0 OS: CentOS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: Alastair at adewra dot com
New email:
PHP Version: OS:


 [2012-03-08 12:36 UTC] Alastair at adewra dot com
Currently running Lighttpd which returns a 500 - Internal Server Error with this 

2012-03-08 12:26:32: (mod_fastcgi.c.2568) unexpected end-of-file (perhaps the 
fastcgi process died): pid: 10734 socket: unix:/tmp/php.socket10726-3 
2012-03-08 12:26:32: (mod_fastcgi.c.3356) response not received, request sent: 
879 on socket: unix:/tmp/php.socket10726-3 for /index.php?, closing connection 

php -v:

PHP 5.4.0 (cli) (built: Mar  7 2012 20:14:12) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

php-cgi -v:
PHP Warning:  Unknown: function '1' not found or invalid function name in Unknown 
on line 0
PHP 5.4.0 (cgi-fcgi) (built: Mar  7 2012 20:14:29)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

configure line:
./configure --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d -
-with-libdir=lib64 --with-mysql --with-mysqli --with-zlib --with-curl --with-
mcrypt --enable-cgi

If there is anything else I can do to help I will. Sorry, this is my first bug 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-09 02:35 UTC]
-Status: Open +Status: Feedback
 [2012-03-09 02:35 UTC]
Hi, plz look into the pwd of php-cgi, check is there any core dump file generated? 

if find one, plz paste the bt here. 

 [2012-03-09 16:09 UTC] Alastair at adewra dot com
Sorry, i actually ended up downgrading it to 5.3.3 as it was a live server fr 
other content and it wasn't a necessity to have it on 5.4.0

Unfortunately, I didnt have core dump set up and when i ran strace, it simply 
just hung.

I rebuilt the source several times, and tried to reinstall but it returned the 
same error.

I do still have the old php-cgi on my server (but my lighttpd config is currently 
pointing to the 5.3.3 one) in a different directory, and when i run -v on the 
5.4.0 it now has excluded the warning.
 [2012-03-21 10:40 UTC] rm at romanrm dot ru
In /etc/lighttpd/conf-enabled/15-fastcgi-php.conf
I had to change /tmp/php.socket to /tmp/php.socket-0
and then it worked.
Looks like the new PHP creates the socket under a different name, adding "-0" to it.
 [2012-03-21 10:42 UTC] rm at romanrm dot ru worked briefly, but then suddenly stopped with the same symptoms again, and in I notice that the socket got renamed to "/tmp/php.socket-0-0" this time. Duh!
 [2012-03-26 15:19 UTC] chlovechek at amis dot net
I am experiencing the exact same problem on Debian Wheezy (PHP 5.4.0-2 and Lighttpd 1.4.30-1). Bellow is the backtrace from core dump:

#0  zend_llist_add_element (l=0x0, element=0x7fff44c32990) at /tmp/buildd/php5-5.4.0/Zend/zend_llist.c:39
#1  0x000000000046b9a0 in _php_list_set_error_structure (error=0x6d69, msg=0x7fff44c32990 "")
    at /tmp/buildd/php5-5.4.0/ext/libxml/libxml.c:485
#2  0x00007f01ef3a7103 in __xmlRaiseError (schannel=0x46b9b0 <php_libxml_structured_error_handler>, channel=0, data=0x0, ctx=0x23d61a0, 
    nod=0x0, domain=5, code=76, level=XML_ERR_ERROR, file=<optimized out>, line=1, str1=0x23d77e4 "", str2=0x0, str3=0x0, int1=0, col=416, 
    msg=0x7f01ef48a7e3 "Unexpected end tag : %s\n") at ../../error.c:588
#3  0x00007f01ef3e4018 in htmlParseErr (ctxt=0x23d61a0, error=<optimized out>, msg=<optimized out>, str1=<optimized out>, 
    str2=<optimized out>) at ../../HTMLparser.c:114
#4  0x00007f01ef3e73dd in htmlParseEndTag (ctxt=0x23d61a0) at ../../HTMLparser.c:3856
#5  htmlParseEndTag (ctxt=0x23d61a0) at ../../HTMLparser.c:3800
#6  0x00007f01ef3e9480 in htmlParseContentInternal (ctxt=0x23d61a0) at ../../HTMLparser.c:4403
#7  0x00007f01ef3e9fcf in htmlParseDocument__internal_alias (ctxt=0x23d61a0) at ../../HTMLparser.c:4660
#8  0x0000000000498660 in dom_load_html.isra.1 (ht=0, return_value=0x23bbd38, this_ptr=0x230cd98, mode=0)
    at /tmp/buildd/php5-5.4.0/ext/dom/document.c:2195
#9  0x00000000007493a9 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f01f2157cd0)
    at /tmp/buildd/php5-5.4.0/Zend/zend_vm_execute.h:642
#10 0x000000000070340f in execute (op_array=0x23efe50) at /tmp/buildd/php5-5.4.0/Zend/zend_vm_execute.h:410
#11 0x00000000006a36a0 in zend_execute_scripts (type=0, retval=0x0, file_count=3) at /tmp/buildd/php5-5.4.0/Zend/zend.c:1272
#12 0x0000000000642f13 in php_execute_script (primary_file=0x0) at /tmp/buildd/php5-5.4.0/main/main.c:2473
#13 0x0000000000431ae6 in main (argc=32767, argv=0x1) at /tmp/buildd/php5-5.4.0/sapi/cgi/cgi_main.c:2422
 [2012-03-26 20:27 UTC] samuel dot hassine at anotherservice dot com

I am experiencing the same problem on Debian testing with :

php5 5.4.0-2

FastCGI PHP processes are unexpectly died.

Best regards.
 [2012-03-31 10:14 UTC] easton at geekness dot eu
After turning 'magic_quotes_gpc' and 'register_long_arrays' to Off in the php.ini, I no longer received a 500 error (PHP 5.4.0-3 and Lighttpd 1.4.30-1 on Debian Wheezy)
 [2012-03-31 15:47 UTC]
Both 'magic_quotes_gpc' and 'register_long_arrays' are gone in 5.4 though, so 
that doesn't make much sense unless it is the startup ini warning about these 
being gone that is getting in the way for you.
 [2012-09-18 20:29 UTC]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Closing as a duplicate of #61557 ( Please 
try the patch attached there.
 [2012-09-18 20:29 UTC]
-Status: Feedback +Status: Duplicate
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Oct 02 02:01:25 2023 UTC