php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58831 FCGI process dies when redeclare a class
Submitted: 2009-08-26 13:35 UTC Modified: 2013-02-18 00:35 UTC
From: robert at joinr dot de Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5.2.4 OS: Debain Etch
Private report: No CVE-ID: None
 [2009-08-26 13:35 UTC] robert at joinr dot de
Description:
------------
On our staging system I got 500 internal server errors behind a lighttpd -> fastcgi -> php setup, when I redeclare a class. With the same built as cli, I only get the expected error without process-dying.

I use the last stable release (3.0.19) of APC. Without APC, I see the error-line in the browser window, and when I enable APC again, I come back to the 500.

The script is very simple:
<?php

include '/srv/ship/lib/sql.php';
include '/srv/ship/lib/sql.php';

?>

and the end of the strace output looks like:

read(4, "<?php\n\n\ninclude \'/srv/ship/lib/sql.php\';\ninclude \'/srv/ship/lib/sql.php\';\n\n?>", 8192) = 93
read(4, "", 4096)                       = 0
read(4, "", 8192)                       = 0
time(NULL)                              = 1251305564
close(4)                                = 0
munmap(0xb7efd000, 4096)                = 0
stat64("/srv/ship/lib/sql.php", {st_mode=S_IFREG|0644, st_size=8250, ...}) = 0
stat64("/srv/ship/lib/sql.php", {st_mode=S_IFREG|0644, st_size=8250, ...}) = 0
time(NULL)                              = 1251305564
write(2, "[Wed Aug 26 18:52:44 2009] [apc-error] ", 39) = 39
write(2, "Cannot redeclare class sql", 26) = 26
write(2, "\n", 1)                       = 1
exit_group(2)                           = ?
Process 32267 detached


Hope this helps. Maybe I find the time to search for the bug to post a simple fix.

Robert


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-18 13:25 UTC] at php dot net
I'm just going through these issues here ? I just wanted to 
confirm:

The error is that the actual fcgi process dies from "Cannot 
redeclare class"? Instead of just error'ing etc.?

Can you test this again with a more recent version?
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC