We just moved our web tree to a new server and upgraded PHP to 4.1.2 from
4.0B2 and
Apache 1.3.23 from 1.3.9
One application decided it didn't like the change. It's an upload app.
that users can subscribe to and store their files. Each user has their own
directory.
It may be some configuration problem but I've narrowed down the issue to
the filesize() function or possible readdir().
One of the first things the script does at user login is read all the
directories and get their current file size.
echo "v: $v<BR>";
$h2 = @opendir ($v);
if ($h2) {
while ($f2 = readdir($h2)) {
echo "[ f2: $f2 <br>".filesize($f2)."]<BR>";
$totalFileSize += filesize($f2);
}
closedir ($h2);
}
The error I'm getting is: (notice where I echoed $f2 to the screen and I
don't know if it's reading the wrong directory)
v: /www/fileupload/uploads/377
h:
[ f2: .
4096]
[ f2: ..
4096]
Warning: stat failed for Grant_Application.doc (errno=2 - No such file or
directory) in /www/fileupload/index.php on line 302
[ f2: Grant_Application.doc ]
Warning: stat failed for Grant_Application_Text_AA2.doc (errno=2 - No such
file or directory) in /www/fileupload/index.php on line 304
...and on an on the same 2 Warnings for each and every file in each and
every directory.
Any help or hints or optimistic statements appreciated!