|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58990 apc kills php on some fatal errors
Submitted: 2009-12-14 14:44 UTC Modified: 2016-08-31 15:22 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: momchil at xaxo dot eu Assigned: cmb (profile)
Status: Wont fix Package: APC (PECL)
PHP Version: 5.2.10 OS: GNU/Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-12-14 14:44 UTC] momchil at xaxo dot eu
APC kills php upon some fatal errors. This is not a desired behavior when not running in a terminal. Instead APC should give php the opportunity to response with "Fatal error..." to the request.

Reproduce code:

class a{}

Expected result:
Fatal error: Cannot redeclare class a in test.php on line ....

That comes out if ones executes:

class a{};
class a{};

which is the desired behavior.

Actual result:
php process is killed. "[apc-error] Cannot redeclare class a" is printed to stderr.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-13 05:13 UTC] tomas at pionect dot nl
We experience the same problem.
When developing a new application we accidentally made a controller and a model with the same name.
In the apache error log we found:

[Wed Jul 13 10:56:35 2011] [apc-error] Cannot redeclare class Classname
[Wed Jul 13 10:56:35 2011] [crit] Parent: child process exited with status 2 -- Aborting.

Apache simply stopped working and had to be started manually.
 [2016-08-31 15:22 UTC]
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2016-08-31 15:22 UTC]
According to <>, APC support has been
discontinued in favor of OPcache, APCu, the session upload
progress API and WinCache. Therefore this issue won't get fixed.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 13 11:01:28 2024 UTC