http://svn.php.net/viewvc?view=revision&revision=288945 Index: ext/standard/file.c =================================================================== --- ext/standard/file.c (revision 288706) +++ ext/standard/file.c (revision 288971) @@ -838,6 +838,10 @@ convert_to_string_ex(arg1); convert_to_string_ex(arg2); + if (PG(safe_mode) &&(!php_checkuid(Z_STRVAL_PP(arg1), NULL, CHECKUID_ALLOW_ONLY_DIR))) { + RETURN_FALSE; + } + if (php_check_open_basedir(Z_STRVAL_PP(arg1) TSRMLS_CC)) { RETURN_FALSE; }