php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63070 apc.include_once_override bug
Submitted: 2012-09-12 06:11 UTC Modified: 2012-09-14 18:05 UTC
From: laruence@php.net Assigned: laruence (profile)
Status: Closed Package: APC (PECL)
PHP Version: Irrelevant OS:
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 !
Your email address:
MUST BE VALID
Solve the problem:
22 + 34 = ?
Subscribe to this entry?

 
 [2012-09-12 06:11 UTC] laruence@php.net
Description:
------------
apc include_once_override is not implemented properly. 

access following test script more than twice, will result a fatal error

Test script:
---------------
index.php:
<?php
set_include_path("/tmp");
function a($arg = array()) {
    include_once("b.php");
}

a();
a();
?>

/tmp/b.php
<?php
class B {
}
?>

Expected result:
----------------
works well

Actual result:
--------------
Fatal error: include(): Cannot redeclare class b 

Patches

bug63070.patch (last revision 2012-09-13 08:28 UTC by laruence@php.net)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-12 06:29 UTC] laruence@php.net
The following patch has been added/updated:

Patch Name: bug63070.patch
Revision:   1347431372
URL:        https://bugs.php.net/patch-display.php?bug=63070&patch=bug63070.patch&revision=1347431372
 [2012-09-12 06:31 UTC] laruence@php.net
I propose only override include_once for absolute path, to save one *open* call.

thus,  our include_once_override option will be strong, and a little useful

what do you think? thanks
 [2012-09-12 06:48 UTC] laruence@php.net
The following patch has been added/updated:

Patch Name: bug63070.patch
Revision:   1347432535
URL:        https://bugs.php.net/patch-display.php?bug=63070&patch=bug63070.patch&revision=1347432535
 [2012-09-13 08:28 UTC] laruence@php.net
The following patch has been added/updated:

Patch Name: bug63070.patch
Revision:   1347524909
URL:        https://bugs.php.net/patch-display.php?bug=63070&patch=bug63070.patch&revision=1347524909
 [2012-09-13 08:28 UTC] laruence@php.net
The following patch has been added/updated:

Patch Name: bug63070.patch
Revision:   1347524911
URL:        https://bugs.php.net/patch-display.php?bug=63070&patch=bug63070.patch&revision=1347524911
 [2012-09-14 18:04 UTC] laruence@php.net
Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=327665
Log: Fixed bug #63070 (apc.include_once_override bug)
 [2012-09-14 18:05 UTC] laruence@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-09-14 18:05 UTC] laruence@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC