php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60709 Any php file of size 8192 bytes crashes Apache and PHP
Submitted: 2012-01-11 07:51 UTC Modified: 2012-01-11 12:34 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: bugzilla33 at gmail dot com Assigned:
Status: Duplicate Package: Reproducible crash
PHP Version: 5.4.0RC5 OS: Win All
Private report: No CVE-ID: None
 [2012-01-11 07:51 UTC] bugzilla33 at gmail dot com
Description:
------------
1. use Test script to generate crash.php, size 8192 bytes
2. now let crash php engine crash.php
3. Any php file of size 8192 bytes crashes Apache and PHP!
4. Tested with Apache 2.2.21 V9 apache longue, PHP 5.4.0 RC5 or RC6 dev on three other machines, Win 7 x86 or Win 7 x64.

Test script:
---------------
testcase php file generator:

<?php

 $out='<?php//';
 for($z=0;$z<8192-9;$z++){$out.=mt_rand(0,9);}
 $out.='?>';

 file_put_contents('crash.php',$out);

 print('1. testcase file generated: crash.php, size '.strlen($out).' bytes<br/>');
 print('2. now let crash php engine <a href="crash.php">crash.php</a><br/>');
 print('<b style="color:red">3. Any php file of size 8192 bytes crashes Apache and PHP!</b><br/>');
 print('4. Tested with Apache 2.2.21 V9 apache longue, PHP 5.4.0 RC5 or RC6 dev on three other machines, Win 7 x86 or Win 7 x64.<br/>');
?>

Expected result:
----------------
NO crash

Actual result:
--------------
CRASH

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-11 07:54 UTC] bugzilla33 at gmail dot com
Apache error.log:

[Wed Jan 11 08:39:51 2012] [notice] Parent: child process exited with status 255 -- Restarting.
 [2012-01-11 09:01 UTC] ninzya at inbox dot lv
Duplicate: https://bugs.php.net/bug.php?id=48034
 [2012-01-11 09:36 UTC] bugzilla33 at gmail dot com
The shortest working example:

<?php
 file_put_contents('8192_testcase.php',str_repeat(' ',8192));
?>
<a href="8192_testcase.php">run testcase</a>

Use Apache 2.2.21, PHP 5.*, Win 7 x86/x64
 [2012-01-11 10:19 UTC] pajoye@php.net
See #48034
 [2012-01-11 10:19 UTC] pajoye@php.net
-Status: Open +Status: Duplicate
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 28 08:01:28 2024 UTC