|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #27346 can't capture error code - should be 403?
Submitted: 2004-02-22 08:03 UTC Modified: 2017-01-29 04:22 UTC
Avg. Score:3.3 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
From: douglas at gpc dot edu Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 4.3.4 OS: Tru64 5.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: douglas at gpc dot edu
New email:
PHP Version: OS:


 [2004-02-22 08:03 UTC] douglas at gpc dot edu
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:

(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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-20 20:19 UTC]
-Status: Open +Status: Feedback -Package: Feature/Change Request +Package: *General Issues
 [2017-01-20 20:19 UTC]
Is this still relevant?
 [2017-01-29 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 13 17:01:30 2024 UTC