- if (!*tmp || php_check_open_basedir(tmp TSRMLS_CC) || \
- (PG(safe_mode) && !php_checkuid(tmp, "rb+", CHECKUID_CHECK_MODE_PARAM))) { \
- http_error_ex(HE_WARNING, HTTP_E_INVALID_PARAM, "Permission denied: %s", file); \
+ if ( (tmp != file || !strstr(file, "://")) && \
+ (!*tmp || php_check_open_basedir(tmp TSRMLS_CC) || \
+ (PG(safe_mode) && !php_checkuid(tmp, "rb+", CHECKUID_CHECK_MODE_PARAM)))) { \