I'm a designer who knows very little (practically nothing) about programming so programming dynamic sites is challenging to say the least! And don't really remember how to use DOS either. Ulitimately, I'm trying to use PHP with Dreamweaver CS4.
I've just installed Xampp on my Windows XP (sp2) machne. Following instructions in a book called "Dreamweaver CS$ with CSS, Ajax, and PHP", I moved the "server root to a different location, as follows:"
- I created a new folder called htdocs located at the top level of my C drive. (C:/htdocs)
I edited the Apache configuration file, httpd.conf I changed the pathname from DocumentRoot "C:/xampp/htdocs" to "C:/htdocs".
I changed the line that read "<Directory C:/xampp/htdocs" to <Directory "C:/htdocs">
I created a virtual host on Apache so that I could test multiple sites. I registered the virutual host on Windows by doing the following:
1. I placed my virtual host in a folder called C:\vhosts and a subfolder called silverlinemarket
2. I opened C:\WINDOWS\system32\drivers\etc\hosts in Notepad and looked for the following line at the bottom of the file: 127.0.0.1 localhost
3. On a sparate line, I entered 127.0.0.1 silverlinemarket
4. I opened the Apache configuration file, http;d.conf. I scrolled down to the Supplemental configuration section at the end of httpd.conf. In the follwing section, "Include conf/extra/httpd-vhost.conf", I made sure this line was uncommented by making sure the"#" was not there. I saved the file and then closed it.
5. I opened httpd-vhosts.conf. After the "You may use the command line option '-S' to verfy your virtual host configuriation " I typed the following:
<Directory C:/vhosts>
Order Deny, Allow
Allow from all
</Directory>
6. For my virtual host definitions I used the following:
<VirtualHost *:80>
DocumentRoot c:/xampp/htdocs
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot c:/vhosts/silverlinemarket
ServerName silverlinearket
</VirtualHost>
When I open the Xampp Control Panel Application, it says the following:
Xampp Control Panel Version 2.5.8 (2009-7-28)
Xampp for Windows Version 1.7.2
Windows 5.1 Build 2600 Platform 2 Server Pack 2
Current Directory: C:\xampp
Status Check OK
Busy...
Apache service started
My problems are when I type "http://localhost/" in Google's browser I get the following message: "Oops! This link appears to be broken." In Firefox I get the following, the status bar message says "Waiting for localhost..." and it looks like the browser justs hangs up. I'm trying to set up a testing environment on my machine locally. I want to test out my php code locally on my machine before I upload it to a remote web server. I don't want to crash a remote server by testing there. I want to make sure that my code works before I upload it.