From: glen at delfi dot ee
Operating system: PLD Linux
PHP version: 5.1.5
PHP Bug Type: Feature/Change Request
Bug description: file operations make loads of lstat64() calls and making code
ineffective
Description:
------------
$ strace php -r 'for ($i=0;$i<5;$i++)
{$fp=fopen("/home/glen/tmp/php/long/test/dir/is/here/$i","w");fclose($fp);}'
2>&1 |grep /home
this will call lstat64() each time on:
/home
/home/glen
/home/glen/tmp
/home/glen/tmp/php
/home/glen/tmp/php/long
/home/glen/tmp/php/long/test
/home/glen/tmp/php/long/test/dir
/home/glen/tmp/php/long/test/dir/is
/home/glen/tmp/php/long/test/dir/is/here
while it should either don't do them at all or at least
cache the paths that haven't been altered (i only write to
last dir)
--
Edit bug report at http://bugs.php.net/?id=38567&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=38567&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=38567&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=38567&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38567&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=38567&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38567&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38567&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38567&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38567&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38567&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=38567&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=38567&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38567&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38567&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38567&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38567&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38567&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38567&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38567&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38567&r=mysqlcfg