From: asykakimo at yahoo dot com dot tw
Operating system: Win2000
PHP version: 4.3.2
PHP Bug Type: Filesystem function related
Bug description: File System bug
Description:
------------
The file_get_contents will cause PHP crash in the following code:
$contents=str_replace("\n"," ",file_get_contents($file));
$contents=strip_tags($contents,'<a><frame><area><meta>');
$tags=(preg_match("|</frameset>|i",$contents))?"src":"href";
$tags=(preg_match("|<meta
http-equiv=\"?refresh\"?.*url|i",$contents))?"url":$tags;
echo $tags;
------------------------------------------------------------
The $file variable is come from http://www.starwars.com/index.html
If I replace the file_get_contents with fread function, the php remain
this bug too.
Thank
--
Edit bug report at http://bugs.php.net/?id=24556&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24556&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24556&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=24556&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24556&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24556&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24556&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24556&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24556&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24556&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24556&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24556&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24556&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24556&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24556&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24556&r=gnused