4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: noidguy on November 24, 2002, 02:07:31 AM
-
I've seen this topic mentioned before, but have never found a simple solution in English.
Here is the error message I get in some of my categories...
Warning: open_basedir restriction in effect. File is in wrong directory in /home/.decker/"mylastname"/gynoid.dreamhost.com/4images/includes/functions.php on line 366.
Some categories with images get multiple error messages. The main page is here: www.gynoid.dreamhost.com/4images
Could someone check it out and give me some tips? Thanks.
-
Replace
$src = (!file_exists($media_src) && file_exists(preg_replace("/\/{2,}/", "/", get_document_root()."/".$media_src))) ? preg_replace("/\/{2,}/", "/", get_document_root()."/".$media_src) : $media_src;
with
$src = (!@file_exists($media_src) && @file_exists(preg_replace("/\/{2,}/", "/", get_document_root()."/".$media_src))) ? preg_replace("/\/{2,}/", "/", get_document_root()."/".$media_src) : $media_src;
in includes/functions.php.
Jan
-
Thank you, that seems to have done it. :D
-
Jan, just courious, what @ does? why do u use it at first place if it make some problem?
-
@ in front of function names supresses the error message.
Jan
-
ah! thx!
-
so, basicaly, this is not a fix? its just hides the problem? :?
-
In most cases yes, in this case no. The script tries to check if the path is relative to the Document Root, no problem if the file is not there.
Newer PHP versions output error messages here, older doesn't.
Jan