From: douglas at gpc dot edu Operating system: Tru64 5.1 PHP version: 4.3.4 PHP Bug Type: Apache related Bug description: can't capture error code - should be 403?
Description: ------------ We have all or .htm and .html (as well as .php, ...) files go through php. When a person creates a web page and saves the file with the wrong permissions so that they are not accessable by the httpd daemon, instead of giving an error like 403, the page returned is: Warning: Filed opening '/users/johndoe/public_html/x.html' for includsion (include_path=".:/usr/local/etc/php') in Unknown on line 0 The file (unix) is mode 600. If we change it to 644, there is no problem. Should not this be returned so that an error handler can handle it, such as 403 code? Please note the above error came from: http://www.gpc.edu/~johndoe/x.html (this is not a real link, but that is the format of the link.) Reproduce code: --------------- Not (php) code related - file system permission. Expected result: ---------------- The expected result is that this would be caught by 403 error code. Actual result: -------------- It gives a php result that it can't include the file. Is there a separate php error code list we should capture in config files? Basically, we want a cleaner way of handleling such errors so that it makes more sense to the visitor to a page, such as the 403 error for normal apache would do. -- Edit bug report at http://bugs.php.net/?id=27346&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27346&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27346&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27346&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27346&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27346&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27346&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27346&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27346&r=support Expected behavior: http://bugs.php.net/fix.php?id=27346&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27346&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27346&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27346&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27346&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27346&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27346&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27346&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27346&r=float