How to change the php file location to other place?

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
hanxiao
Forum Newbie
Posts: 12
Joined: Sun Apr 16, 2006 10:58 pm
Location: Auckland, New Zealand
Contact:

How to change the php file location to other place?

Post by hanxiao »

I use MySQl 5.0, PHP 5.12, Apache 2.055, Dreamweaver MX 2004, Windows XP+SP2 and use localhost to programme PHP.


I put all the php files under apache installnation directory "D:\Apache Group\Apache2\htdocs", and the project folder is Learn, so all the files are under "D:\Apache Group\Apache2\htdocs\Learn", and use Dreamweaver MX 2004 to set up the Local Server, Remote Server and Testing Server. But for Testing Server, I don't know what should I put under URL prefix? Because currently it is under "http://localhost:8080/Learn/Testing/"

Just wonder how do I change the php.ini or httpd.conf to let me change the php file location to other places?

I heard from my friend, something like VirtualHost is the place I need to modify.

Thank you.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

And what was unclear in the documentation for the Virtual Hosts? Btw, have you searched this forum since i've posted that section of my httpd.conf quite some times...

Btw, what you really need to read is the documentation for DocumentRoot.
hanxiao
Forum Newbie
Posts: 12
Joined: Sun Apr 16, 2006 10:58 pm
Location: Auckland, New Zealand
Contact:

Post by hanxiao »

I am new for PHP, Apache, not expert like you. I need direction.

I haven't searched this forum yet as I don't know there is such a tutorial post.

And I didn't see the documentation for the config file.

Thanks anyway.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Well, this is probably the best entry point for reading up on Configuration Files.
hanxiao
Forum Newbie
Posts: 12
Joined: Sun Apr 16, 2006 10:58 pm
Location: Auckland, New Zealand
Contact:

Post by hanxiao »

Yeah, thanks. I think I made it. I can uncomment and modify the VirtualHost section at the end of httpd.conf file, and also the NameVirtualHost to be the port I want to use for Apache.

So everything works. I can show the php page from the default directory and also other directories which are not under the Apache folder.

Thank you.
Post Reply