|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-04-21 10:22 UTC] ninzya at inbox dot lv
Description: ------------ Configuration: Apache HTTPd 2.0.61.200 PHP: 5.3.0RC1 OS: Windows XP SP3 PHP crashes apache when php file including php tags + data between them is 8192 bytes (8KB) long. Reproduce code: --------------- Create file with the following content: <?php(any 8185 byte long data)?> or <?(any 8188 byte long data)?> and request it through the browser. Expected result: ---------------- No crashes Actual result: -------------- Crash Patchesmmap.diff.txt (last revision 2012-01-16 14:43 UTC by dmitry at zend dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 21:00:01 2025 UTC |
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: -------------- CRASHThe 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