Forum Moderators: phranque

Message Too Old, No Replies

Executing PHP/MySQL on Win XP

Where do the files go?

         

Freejak

5:35 am on Jul 17, 2004 (gmt 0)



I am reading the book: Build Your Own Database Driven Website Using PHP & MySQL by Kevin Yank. I have a website that supports PHP & MySQL, which I have been using to test PHP scripts. As I have Apache server & MySQL installed on my PC, I would like to run my scripts there but where do I place the HTML/PHP files so they will execute properly?.

System Specs:
Windows XP Pro.
AMD Athlon 1.6
256 MEG Ram
PHP 4.3.7
MySQL (mysqld-max-nt)
Apache Server 1.3
Mozilla Firefox Browser

gergoe

1:02 pm on Jul 22, 2004 (gmt 0)

10+ Year Member



You should be familiar with the configuration files of apache to accomplish on this, see the apache documentation at [httpd.apache.org...]

Based on what you have configured in the httpd.conf, you could be in two situations:

  • If you don't have virtual hosting configured (no VirtualHost containers in the httpd.conf file) then you need to check where the DocumentRoot directive is pointing in the httpd.conf, and put your web files (html, php, jpg, etc) into that directory. You can change the directory also (because by default it is pointing to the htdocs subdirectory of the apache installation) to something else, but then you need to change the <Directory> container you'll find beloew the DocumetRoot directive to let it pointing to the same directory.
  • If you have VirtualHosts defined, then the DocumentRoot directives of each virtualhost can be pointing to a different directory, and based on which virtualhost you want to use, you need to put the web files into that directory.

If you've installed the standard apache distribution package then you don't have any VirtualHost directive enable, so likelly you have a htdocs directory in the apache installation directory, where you can place your files.