I recently installed apache2, mySQL, and php4 on win98 (before I had MDAC installed) (newbie) and have the following problem...
functions like is_dir(), always return 0 whether it's a directory or not. The stat() functions return an error or no data. It seems as if these functions are finding no file or directory data, even though functions like fopen() will work. Is this a php problem? windows? apache? anyone have any ideas?
stat(), is_dir, is_file, etc... not working
Moderator: General Moderators
-
StillGreen
- Forum Newbie
- Posts: 2
- Joined: Mon Sep 30, 2002 11:02 pm
- Location: Fargo
Apache 2.0.43 / MySQL 3.23.52 / PHP 4.2.3 on RedHead Linux 7
I have exactly the same problem that you describe - except on Linux.
I had discovered this problem after uptating my LAMP-Architecture on my phpBB2-BulletinBord.
It comes into troble with file_exists() which does not work anymory.
After some nightly hours it looks like that the problem lies between Apache 2.0 and the new (?) API for PHP.
Jan.
I had discovered this problem after uptating my LAMP-Architecture on my phpBB2-BulletinBord.
It comes into troble with file_exists() which does not work anymory.
After some nightly hours it looks like that the problem lies between Apache 2.0 and the new (?) API for PHP.
Jan.
From the PHP Manual:-
and[Editor's note: you need to pass either the correct relative or absolute path to the function]
is_dir() does not work correctly (i.e. returns false on some folders) unless you chdir() to folder that contains the file/folder you are checking.
[on Linux Red Hat 7.2]
Just as a quick addition to another comment, you must also chdir() on Windows machines.