Click to See Complete Forum and Search --> : setting root directory


ericmarsh
03-07-2004, 07:25 PM
I am trying to setup an apache test server on my XP machine. I already have a website built on a Linux box using php. I have used full paths in all of my include statements through out the site (i.e /home/my_dir/public_html/include.php). The problem is that on my XP machine using the forward slash at the beginning of the include statement automaticly references my c:/ thus messing up all of my include paths.

The directory structure on my XP machine is as follows
c:/web/my_website/home/my_dir/public_html

How how to make "/" in an include statement reference my "c:/web" directory instead of my "c:/" directory. To make this even more complex, I am using a virual host in my httpd.conf file.

Here are the highlights from my httpd.conf file
ServerRoot "C:/web"
DocumentRoot "C:/web"

<VirtualHost 127.0.0.1>
DocumentRoot "c:/web/my_site/home/my_dir/public_html"
ServerPath my_site
ServerName my_site
php_value include_path ".;c:/web"
</VirtualHost>

As you can see I tried setting the c:/web as my include path, but this still does not work.

Any help anyone can offer I would really apreciate

Thanks in advance

Moonglobe
03-08-2004, 01:27 AM
chroot()

ericmarsh
03-08-2004, 09:59 AM
Thanks for the idea, but according to the link, chroot is not supported on the Windows platform. Do you have any other ideas?

Thanks

Moonglobe
03-08-2004, 11:32 AM
reference everything by prepending $_SERVER['DOCUMENT_ROOT']? that's about all you can do bsides putting this on a separate drive.

ericmarsh
03-08-2004, 12:53 PM
I was hoping that I would not have to edit the files again, but if that is what it takes, that is what it takes.

Thanks for your help!