Another open_basedir Issue

Hep

New member
Joined
Jun 6, 2007
Messages
1
Hi guys, I'm stuck on something which I need to get some help with.

On our server we have two domains.

Lets say it looks like this.
/home/domain1/domains/domain1.com/public_html/
/home/domain2/domains/domain2.com/public_html/

Now I have to get domain2 to read a file from domain1 to show banners this folder is called adserver for example. Now when we use our IP address http://xx.xxx.xxx.xxx/~username this works fine. Obviously as it's treating it all as one domain. However now that we have our DNS all setup domain2.com doesn't work.

The error is
Warning: include_once() [function.include-once]: open_basedir restriction in effect. File(/home/domain2/domains/domain2.com/public_html/adserver/delivery/alocal.php) is not within the allowed path(s): (/home/domain2/:/tmp:/usr/local/lib/php/) in /home/domain2/domains/domain2.com/public_html/banner_include.php on line 105

Reading my phpinfo file the openbase_dir is set to "no value"

How do I give domain2 permission to read from domain1?
 
File(/home/domain2/domains/domain2.com/public_html/adserver/delivery/alocal.php) is not within the allowed path(s): (/home/domain2/:/tmp:/usr/local/lib/php/) in /home/domain2/domains/domain2.com/public_html/banner_include.php on line 105

I dont see banner_include.php trying to access alocal.php from domain1?

I think all you need to do in this case is modify the virtual httpd conf file for domain2 and add either /home/domain1/domain1.com/public_html/adserver/ or /home/domain1/ to the open_basedir directive
 
open_basedir is set into "PHP SafeMode Configuration". Turn it off for that domain.
 
Back
Top