Files not seen as files (and won't unlink)
Posted: Sat Dec 25, 2004 2:44 am
I have created a script to backup a database. The script first checks for the day, then uses the day's name for the directory (Sunday, Monday, Tuesday, etc.). Then it deletes all files from that directory. Finally, it 'creates/saves' the new files to the directory.
Ok, the problem:
In one directory, the is_file() does not recognize the files as files... it reads them (using $dirName->read()), but NO files in this directory pass the is_file() test. To make things more curious, the files are also not deleted by unlink(). The is_dir() test works fine and reads . and .. as directories. The files are not mistaken for directories either.
The permissions on the directories are all the same (0777). The script is running as a cron job and it 'logs in' as the same user each day.
Server: Linux/Apache 2.0, PHP 4.3.8
Anyone got any ideas?? Thanks!
Ok, the problem:
In one directory, the is_file() does not recognize the files as files... it reads them (using $dirName->read()), but NO files in this directory pass the is_file() test. To make things more curious, the files are also not deleted by unlink(). The is_dir() test works fine and reads . and .. as directories. The files are not mistaken for directories either.
The permissions on the directories are all the same (0777). The script is running as a cron job and it 'logs in' as the same user each day.
Server: Linux/Apache 2.0, PHP 4.3.8
Anyone got any ideas?? Thanks!