From: cbutler at technophobia dot co dot uk Operating system: Debian GNU/Linux PHP version: 5.2.2 PHP Bug Type: Filesystem function related Bug description: rename() file not found error message is ambigous
Description: ------------ The error message given by rename() when one of its arguments doesn't exist does not distinguish which argument is at fault. This can make tracking down problems more difficult. Reproduce code: --------------- fclose(fopen("testfile", "w")); echo "bad 1st arg"; rename("nonexistantfile", "test"); echo "bad 2nd arg"; rename("testfile", "non/existant/dir"); Expected result: ---------------- bad 1st arg Warning: rename(nonexistantfile,test): nonexistantfile: No such file or directory in Command line code on line 3 bad 2nd arg Warning: rename(testfile,non/existant/dir): non/existant/dir: No such file or directory in Command line code on line 5 Actual result: -------------- bad 1st arg Warning: rename(nonexistantfile,test): No such file or directory in Command line code on line 3 bad 2nd arg Warning: rename(testfile,non/existant/dir): No such file or directory in Command line code on line 5 -- Edit bug report at http://bugs.php.net/?id=41354&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41354&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41354&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41354&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41354&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41354&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41354&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41354&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41354&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41354&r=support Expected behavior: http://bugs.php.net/fix.php?id=41354&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41354&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41354&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41354&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41354&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41354&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41354&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41354&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41354&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41354&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41354&r=mysqlcfg