|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-05-16 12:02 UTC] ptr dot wang at gmail dot com
Description:
------------
use the latest version of PHP (5.3.25) and latest version of APC (3.1.13),
just run this script and watch the memory usage of the php process
(please run with: php -d apc.enable_cli=1 )
<?php
touch('file1.php');
while (true) {
$file = 'file1.php';
require($file);
}
if run with -dapc.enable_cli=0, it does not leak memory.
Test script:
---------------
<?php
touch('file1.php');
while (true) {
$file = 'file1.php';
require($file);
}
Expected result:
----------------
The memory usage should not grow.
Actual result:
--------------
The memory usage grows very quickly.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 01:00:01 2025 UTC |
To stably re-produce the bug, we need create 2 files. // file1.php, can be empty // leak.php <?php while (true) { $file = 'file1.php'; require($file); } then run: php -d apc.enable_cli=1 leak.php hope this helps, thanks.