The error itself:
Code: Select all
Warning: OpenDir: No such file or directory (errno 2) in /var/www/downloadlocal.php on line 38
Warning: Supplied argument is not a valid Directory resource in /var/www/downloadlocal.php on line 39
1) No nasty loop.
2) No nasty error page. Nice looking "an error has occured" page would be possible instead.
3) With the details available (filename, where it was supposed to be, etc.) the server could automagically notify any/all admins. Hell, with enough work it could grep the Donut for videos with that name, and include the paths of those in the notification.
Now, I can't see any reason why this would be difficult (I'm assuming PHP has error handling, which I'm pretty sure it does). The only difficulty would lie in testing it and and changing all the relevant pages (Perl script, anyone?).
I can see how to do this easily enough, I just don't know much PHP.