|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-03-20 14:05 UTC] mkent at magoazul dot com
Description: ------------ When safe mode is enabled htscanner throws errors trying to read missing .htaccess files. Looks like in parse_config_file stream = php_stream_open_wrapper(file, "r", ENFORCE_SAFE_MODE, NULL) is triggering php_checkuid_ex which throws a warning. Reproduce code: --------------- fix http://magoazul.com/tmp/htscanner-0.8.0-fixwarnings.patch Expected result: ---------------- No warnings :) Actual result: -------------- Warning: Unknown: Unable to access /xx/xx/web/xx.com/joomla/.htaccess in Unknown on line 0 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 02:00:01 2025 UTC |
Sure, tried with 5.2.1 and I'm getting Warning: Unknown: Unable to access /xx/xx/web/xx.com/.htaccess in Unknown on line 0 passing the additional REPORT_ERRORS causes the following to be appended to the first warning Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 I've isolated it down to this block in php_checkuid_ex main/safe_mode.c:92 if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS) { if ((flags & CHECKUID_NO_ERRORS) == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to access %s", filename); } return 0; which makes sense as if (fopen_mode[0] == 'r') { mode = CHECKUID_DISALLOW_FILE_NOT_EXISTS; is set earlier in the function.