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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: momchil at xaxo dot eu
New email:
PHP Version: OS:

 

 [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

Pull Requests

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 Oct 04 09:01:27 2024 UTC