|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-01-14 22:19 UTC] bugzilla33 at gmail dot com
Description:
------------
require() crashes Apache
Test script:
---------------
<?php
file_put_contents('test.php',str_repeat('passed, ',1024));
require('test.php');
?>
Expected result:
----------------
require() requires test.php
Actual result:
--------------
require() crashes Apache
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 12:00:01 2025 UTC |
The same problem occurred with CLI version. The file to be 'include' (or 'require'), PHP will crash if its size is multiples of 4096 bytes. OS: both Windows 7 Professional (x64) and Windows 7 Home Premium (32bit) PHP: 5.3.9 (thread safe, with no extension) Test case: First of all, I prepared the file is filled with 4096bytes white spaces. And save as 'test.txt'. with command prompt c:\php-sdk\> php.exe -a <?php require 'test.txt'; ^Z[Ctrl+z enter] -> then crash. another case: test.php <?php file_put_contents('test.txt', str_pad('', 4096)); include('./test.txt'); ?> with command prompt c:\php-sdk\> php.exe test.php -> then crash. Call Stack: > php5ts_debug.dll!lex_scan(_zval_struct * zendlval, void * * * tsrm_ls) line 942 + 0x12 bytes C php5ts_debug.dll!zendlex(_znode * zendlval, void * * * tsrm_ls) line 4975 + 0x10 bytes C php5ts_debug.dll!zendparse(void * tsrm_ls) line 3285 + 0xd bytes C php5ts_debug.dll!compile_file(_zend_file_handle * file_handle, int type, void * * * tsrm_ls) line 364 + 0x9 bytes C php5ts_debug.dll!compile_filename(int type, _zval_struct * filename, void * * * tsrm_ls) line 407 + 0x14 bytes C php5ts_debug.dll!ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(_zend_execute_data * execute_data, void * * * tsrm_ls) line 1966 + 0x14 bytes C php5ts_debug.dll!execute(_zend_op_array * op_array, void * * * tsrm_ls) line 107 + 0x11 bytes C php5ts_debug.dll!zend_execute_scripts(int type, void * * * tsrm_ls, _zval_struct * * retval, int file_count, ...) line 1236 + 0x21 bytes C php5ts_debug.dll!php_execute_script(_zend_file_handle * primary_file, void * * * tsrm_ls) line 2308 + 0x1b bytes C php.exe!main(int argc, char * * argv) line 1184 + 0x13 bytes C php.exe!__tmainCRTStartup() line 555 + 0x19 bytes C php.exe!mainCRTStartup() line 371 C kernel32.dll!7718339a()