Author Topic: open_basedir restriction in effect  (Read 13704 times)

0 Members and 1 Guest are viewing this topic.

Offline noidguy

  • Pre-Newbie
  • Posts: 2
    • View Profile
open_basedir restriction in effect
« 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.

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
open_basedir restriction in effect
« Reply #1 on: November 24, 2002, 10:30:27 AM »
Replace
Code: [Select]
$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
Code: [Select]
$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
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline noidguy

  • Pre-Newbie
  • Posts: 2
    • View Profile
open_basedir restriction in effect
« Reply #2 on: November 24, 2002, 02:46:52 PM »
Thank you, that seems to have done it.   :D

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
open_basedir restriction in effect
« Reply #3 on: November 24, 2002, 05:29:51 PM »
Jan, just courious, what @ does? why do u use it at first place if it make some problem?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
open_basedir restriction in effect
« Reply #4 on: November 24, 2002, 08:40:46 PM »
@ in front of function names supresses the error message.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
open_basedir restriction in effect
« Reply #5 on: November 24, 2002, 08:45:53 PM »
ah! thx!
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
open_basedir restriction in effect
« Reply #6 on: March 24, 2003, 06:09:49 AM »
so, basicaly, this is not a fix? its just hides the problem?  :?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
open_basedir restriction in effect
« Reply #7 on: March 24, 2003, 03:08:43 PM »
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
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search