include/open_basedir restriction problem
Posted: Wed Jun 28, 2006 11:53 am
Hi everybody,
I've the following problem:
I'm building a webshop
I have a domain like domain.com
I want to create multiple shops in subdomains like:
shop1.domain.com / shop2.domain.com / etc..
From these subdomains I want to include the source classes from my main domain so I don't have to copy the whole shop for each instance.
The problems that I've encountered are these:
1. Including http://... doesn't work, the file gets parsed by the server
2. Including from the absolute server path (like /var/www/virtual/.. ) is not allowed, open_basedir restriction in effect.
3. Setting the open_basedir directive in my apache conf file only works for that specific subdomain, I don't want to have to edit the conf everytime I add a subdomain. It's a virtual server, as far as I can see it's not possible to set open_basedir for the entire domain (+subdomains) only one domain at a time.
4. Settind open_basedir in a .htacces file is not allowed
5. Setting it in php.ini has no effect(?) and is undesirable
6. (ini_)Setting the include_path on the page itself still results in a open_basedir restriction error
7. Putting the file in the allowed open_basedir is not conveniant since I'm still working on the classes, uploading will take more time than the changes I make.
So my question:
Does anybody know how to include files from "domain.com/class" into "shop1.domain.nl"?
I've tried and searched, I'm at a loss. Another possibility is to use subdirs in stead of subdomains (http://www.domain.com/shop1), but I think that's ugly..
Thanks in advance..
DeSuper
I've the following problem:
I'm building a webshop
I have a domain like domain.com
I want to create multiple shops in subdomains like:
shop1.domain.com / shop2.domain.com / etc..
From these subdomains I want to include the source classes from my main domain so I don't have to copy the whole shop for each instance.
The problems that I've encountered are these:
1. Including http://... doesn't work, the file gets parsed by the server
2. Including from the absolute server path (like /var/www/virtual/.. ) is not allowed, open_basedir restriction in effect.
3. Setting the open_basedir directive in my apache conf file only works for that specific subdomain, I don't want to have to edit the conf everytime I add a subdomain. It's a virtual server, as far as I can see it's not possible to set open_basedir for the entire domain (+subdomains) only one domain at a time.
4. Settind open_basedir in a .htacces file is not allowed
5. Setting it in php.ini has no effect(?) and is undesirable
6. (ini_)Setting the include_path on the page itself still results in a open_basedir restriction error
7. Putting the file in the allowed open_basedir is not conveniant since I'm still working on the classes, uploading will take more time than the changes I make.
So my question:
Does anybody know how to include files from "domain.com/class" into "shop1.domain.nl"?
I've tried and searched, I'm at a loss. Another possibility is to use subdirs in stead of subdomains (http://www.domain.com/shop1), but I think that's ugly..
Thanks in advance..
DeSuper