file_exists alway returns false

From: annie (bahhab_at_hotmail.com)
Date: 11/09/04


Date: 9 Nov 2004 02:22:55 -0800

Hi

I've got two linux boxes running redhat9 and either PHP Version 4.2.2
or PHP Version 4.3.7. The file structure is set up the same on both
machines and both files exist. The problem is not file specific and
on both machines seq_tables is a symbolic link to another location.

It makes no difference to either version of php whether I use double
or single quotes when asigning a value to $filename. Nor does it
matter whether I use single or double, forward(/) or back(\) slashes
in the path.

I don't use open_basedir in either php.ini file so this warning
doesn't apply. 'If you use open_basedir in php.ini and use file_exists
for file outside open_basedir path, you will not be warned at log and
file_exists returns false even if file really exists.'

So what else could cause the file to be found on the 4.2.2 version but
not on the 4.3.7 version? Any hints will be much appreciated.

Annie

<?php

#####test script############################
$filename = '/var/www/html/seq_tables/lumbricus/sequences/CF610635';

if (file_exists($filename)) {
   print("The file $filename exists<br>");
} else {
   print("The file $filename doesn't exists<br>");
}
#############################################
?>



Relevant Pages

  • mysq/php/blowfish (was vtiger/mysql/encryption)
    ... MySQL stores and php encrypts/decrypts data. ... I used mysqldump and saw that the passwords in MySQL ... machines with varying success. ...
    (freebsd-questions)
  • Re: file_exists alway returns false
    ... > or PHP Version 4.3.7. ... > on both machines seq_tables is a symbolic link to another location. ... > or single quotes when asigning a value to $filename. ... permissions to at least read that file you could return a false on ...
    (comp.lang.php)
  • Re: Reading a cookie
    ... Those machines that are somewhere close to printer x, ... communicate to php that all php-made-printing ... Usually kiosks use kiosk mode of the browser. ...
    (comp.lang.php)
  • Re: PHP OCI8
    ... loading php again didn't do the trick. ... A reboot of the server was ... Afterwards PHP and OCI worked on 1 of the machines:)) When I ... me why but those idiots from Atos installed oracle twice. ...
    (comp.lang.php)
  • Re: confusing >> results
    ... if you shift this right without concern for the sign, ... Indeed it is (on my machines). ... However some other machine running PHP could use sign-and-magnitude ...
    (comp.lang.php)