Forum Moderators: coopster

Message Too Old, No Replies

I have opened the open basedir path, but the restriction remains

Is there any other permission that I have to allow?

         

homeini

3:15 pm on Sep 5, 2008 (gmt 0)

10+ Year Member



I want to access via php to a file, with the require_once function but I can't:

* My open_basedir:/var/www/vhosts/mydomain.com/httpdocs:/tmp:/var/www/vhosts/mydomain.com/private

1.- The script that I execute is /var/www/vhost/mydomain.com/httpdocs/index.php
2.- this scripts requires the script var/www/vhosts/mydomain.com/private/libraries/main.php
3.- And this main.php script requires /var/www/vhost/mydomain.com/private/config/list.php

This is not posible and I have the next error:

Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(/var/www/vhost/mydomain.com/private/config/list.php) is not within the allowed path(s): (/var/www/vhosts/mydomain.com/httpdocs:/tmp:/var/www/vhosts/mydomain.com/private) in /var/www/vhosts/mydomain.com/private/libraries/main.php on line 58

Warning: require_once(/var/www/vhost/mydomain.com/private/config/list.php) [function.require-once]: failed to open stream: Operation not permitted in /var/www/vhosts/mydomain.com/private/libraries/main.php on line 58

Fatal error: require_once() [function.require]: Failed opening required '/var/www/vhost/mydomain.com/private/config/list.php' (include_path='.:.:') in /var/www/vhosts/mydomain.com/private/libraries/main.php on line 58

¿Somebody knows what is happening?

coopster

3:29 pm on Sep 5, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Looks like a plesk control panel structured site considering that "vhosts" subdirectory there. In the control panel "setup" for the site in question you will find "allow PHP" and a box that can be checked/unchecked for "allow safe mode" or something along those lines. I'm betting if you check/uncheck that box, you will resolve the issue.

homeini

3:35 pm on Sep 5, 2008 (gmt 0)

10+ Year Member



Oh!

Thanks for you, but the problem is this:

/vhost/ or /vhosts/ ?

It's an spelling problem, I spend with this... 2hours?

coopster

4:21 pm on Sep 5, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Looks like a plesk control panel structured site considering that "vhosts" subdirectory there.

Sorry, I confused you. What I meant by that statement was that it looks as if you are running plesk on your server. Am I correct?

If so, go into the control panel for that domain and look at the setup area. PHP is likely enabled, but the "safe mode" box on the same line is checked/unchecked, I cannot recall which way it goes right now.

homeini

4:37 pm on Sep 5, 2008 (gmt 0)

10+ Year Member



I haven't explained good myself, I'm spanish and my english is not so well.

What I mean is that the problem is solved. My problem was a pathh problem, look:

/www/vhosts/mydomain.com/private/libraries/main.php
/var/www/vhost/mydomain.com/private/config/list.php

One path has vhosts and the other vhost, i was writing wrong the include path.

Thanks for all

coopster

4:44 pm on Sep 5, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



OH! I see! Understood. Glad you got it figured out.