open_basedir restriction

pinayexpat
pinayexpat's picture

Joined: 2005-06-23
Posts: 4
Posted: Thu, 2005-06-23 21:27

hi everyone,

i have spent the whole day browsing here to look for a solution to my problem which is mentionend above. my standalone gallery2 is working great but unfortunately i can't integrate it to my mambo site due to this matter.

i always got this error when i attempt to view the gallery from my main site.

Quote:
Warning: main(): open_basedir restriction in effect. File(/var/www/web/web309/html/digitalworld/embed.php) is not within the allowed path(s): (/var/www/web309/html/:/var/www/web309/phptmp/:/var/www/web309/files/:/var/www/web309/atd/) in /var/www/web309/html/components/com_gallery2/gallery2.php on line 77

Warning: main(/var/www/web/web309/html/digitalworld/embed.php): failed to open stream: Operation not permitted in /var/www/web309/html/components/com_gallery2/gallery2.php on line 77

Fatal error: main(): Failed opening required '/var/www/web/web309/html/digitalworld/embed.php' (include_path='.') in /var/www/web309/html/components/com_gallery2/gallery2.php on line 77

this problem has nothing to do with the path configuration in mambo admin panel. i would like to know if there is a different code that can replace this require_once(MOS_GALLERY2_PARAMS_PATH . 'embed.php'); to bypass open_basedir

any help you can do to this matter will be highly appreciated.

many thanks in advance.

michiko

 
michiel_1981

Joined: 2005-05-19
Posts: 430
Posted: Thu, 2005-06-23 22:01

install gallery2 multisite, leave the orginal one. Install one where you are running mambo and connect to that one with mambo.

i don't know if this will over come the open_basedir restriction but i though you could use one set of foto files with multiple gallery2 install.

but i could be wrong,
Michiel

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-06-23 22:36

no, it won't. forget multisite.
you'll have to add /var/www/web/web309/html/digitalworld/ and /var/www/web309/html/components to your open basedir paths (php.ini).

or why not set open_basedir path to /var/www/web309/html/ ??

 
pinayexpat
pinayexpat's picture

Joined: 2005-06-23
Posts: 4
Posted: Fri, 2005-06-24 18:52

hi michiel and valiant,

thank you so much for your kind support. it's not possible for me to change the open_basedir path because i have no access to this area. i have talked to my host about this matter and he explained to me that they are not going to change it for security reasons. well, i think i have no other choice than to find for another solution.

by the way, i was experimenting this morning. i changed the "require_once" command to "include". mind you what, the gallery integration was halfway perfect. everything was there and i can even login from mambo site to gallery admin. the only thing is...the thumbnails doesn't show. i can see the folder of the sub-album i created, but no thumbnail...just a broken link is visible. maybe because i removed this code

Quote:
MOS_GALLERY2_PARAMS_PATH .

.

i really don't know whatelse to do. i find gallery2 is superior to other existing mambo gallery component that's why i desperately want to have it.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-06-24 19:45

@include vs require:
from http://php.benscom.com/include/

Quote:
The documentation below also applies to require(). The two constructs are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error. In other words, use require() if you want a missing file to halt processing of the page.

so i wonder why anything works at all. there should be no difference between include and require in the sense how open_basedir restrictions are handled.

perhaps your host actually changed the open_basedir and that's why it works.

as for MOS_GALLERY2_PARAMS_PATH:
why did you remove it?
michiel_1981 will have to handle this, don't know what the meaning of this mambo integration constant is.

 
pinayexpat
pinayexpat's picture

Joined: 2005-06-23
Posts: 4
Posted: Sat, 2005-06-25 00:34

hello valiant,

i downloaded michiel's latest component and installed it at once. surprise, surprise...it's works perfectly :D . i have seen he made a lot of changes like for example the constant. he is great isn't it?

once again thank you so much for everything!