php.net |  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
Votes:1
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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
10 + 28 = ?
Subscribe to this entry?

 
 [2009-12-14 14:44 UTC] momchil at xaxo dot eu
Description:
------------
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:
---------------
test.php:
<?php
require('dummy_include.php');
require('dummy_include.php');
?>

dummy_include.php:
<?php
class a{}
?>

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

That comes out if ones executes:

<?php
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2016-08-31 15:22 UTC] cmb@php.net
According to <https://bugs.php.net/69618>, 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: Fri Mar 29 11:01:29 2024 UTC