From: omikorn at yahoo dot com Operating system: CentOS5 PHP version: 4.4.8 PHP Bug Type: *Directory/Filesystem functions Bug description: current directory problem
Description: ------------ I have a cron script that is run on 2 different machines like this: 1st machine has php 4.3.9 installed. 2nd machine has php 4.4.8 installed. Script is ran from cron on both machines like this: /usr/bin/php /var/www/vhosts/whatever.com/httpdocs/script.php script.php contains the following section: $filename="./mailfile/dailyreport.txt"; $fp=fopen($filename,"r"); if ($fp) { echo "file found"; } else { echo "file not found" } When script is ran from php 4.3.9 box it works fine but from 4.4.8 it returns a file not found error over $fp. Reproduce code: --------------- $filename="./mailfile/dailyreport.txt"; $fp=fopen($filename,"r"); if ($fp) { echo "file found"; } else { echo "file not found" } Expected result: ---------------- Script to behave like in php 4.3.9 Actual result: -------------- $fp returns FALSE and a file not found error -- Edit bug report at http://bugs.php.net/?id=45333&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45333&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45333&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45333&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45333&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45333&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45333&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45333&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45333&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45333&r=support Expected behavior: http://bugs.php.net/fix.php?id=45333&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45333&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45333&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45333&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45333&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45333&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45333&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45333&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45333&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45333&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45333&r=mysqlcfg