From:             samm at os2 dot kiev dot ua
Operating system: FreeBSD 5.3
PHP version:      4.3.10
PHP Bug Type:     Scripting Engine problem
Bug description:  require("thisfile.php") from the script names "thisfile.php" 
crash PHP

Description:
------------
To reproduce a problem create a script, named
1.php.
--- begin of the 1.php ---
<?                                                                        
     
 echo ".";                                                                
     
 require("1.php");                                                        
     
?>                   
--- eof ---
and run from cli or from browser.
Running from the CLI will produce output like:
[EMAIL PROTECTED]/htdocs: php 1.php
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
(core dumped)
Running gdb bt on produced core will show:
(gdb) bt
#0  0x28252c8c in strlcat () from /lib/libc.so.5
#1  0x281d4e41 in realpath () from /lib/libc.so.5
#2  0x080b8346 in virtual_file_ex ()
#3  0x080c00a6 in expand_filepath ()
#4  0x080c8b50 in _php_stream_fopen ()
#5  0x080c89ee in _php_stream_fopen_with_path ()
#6  0x080c95fd in php_plain_files_stream_opener ()
#7  0x080c9bf6 in _php_stream_open_wrapper_ex ()
#8  0x080c9e8e in _php_stream_open_wrapper_as_file_handle ()
#9  0x080ba272 in php_open_wrapper_for_zend ()
#10 0x080d314d in open_file_for_scanning ()
#11 0x080d332c in compile_file ()
#12 0x080d3506 in compile_filename ()
#13 0x08104fee in execute ()
[ ... same errors ]
#885 0x08105130 in execute ()
#886 0x080ec68c in zend_execute_scripts ()
#887 0x080bc7e7 in php_execute_script ()
#888 0x08109087 in main ()




Reproduce code:
---------------
<?                                                                        
     
 echo ".";                                                                
     
 require("1.php");                                                        
     
?> 

Expected result:
----------------
Error, something like "recursion in require", or smth. like this

Actual result:
--------------
core dumped.

-- 
Edit bug report at http://bugs.php.net/?id=31831&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31831&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31831&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31831&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31831&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31831&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31831&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31831&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31831&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31831&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31831&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31831&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31831&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31831&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31831&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31831&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31831&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31831&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31831&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31831&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31831&r=mysqlcfg

Reply via email to