Page 1 of 1

xampp installed but PHP file won't open

PostPosted: 10. February 2010 20:24
by BobNJ
Dear Forum Members:

I installed xampp 1.73 on windows XP SP2. I can open control panel and both apache and MySQL admin pages. The status bar shows everything running. I used v-hosts to create several host sites. I went into system32/drivers/etc and added hosts to the host file with the address 127.0.01 oemgirl. I created another directory C:\vhosts and created a subdirector called oemgirl. In the httpd-vhosts file I added the following code

<VirtualHost 127.0.0.1>
## ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot C:/vhosts/oemgirl
ServerName oemgirl
## ErrorLog @rel_logfiledir@/dummy-host2.example.com-error_log
## CustomLog @rel_logfiledir@/dummy-host2.example.com-access_log common
<Directory C:/vhosts/oemgirl>
# Options Indexes FollowSymLinks
# AllowOverride FileInfo
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>

If I go to my web browser IE7 and type http://localhost/oemgirl/mainpage.php. I get an error 404. If I open the mainpage.php in CS4 dreamweaver and press F12 running the file in a browser the file opens. I have the document root pointing to DocumentRoot "C:/xampp/htdocs" in the first virtualhost definition. If I right click on the file in windows exployer and say open with IE7 the browser opens then a dialog box opens asking me do I wish to open the file or save. If I say open I just loop around with the same question. I beleive it is a security issue. Also in the main config file all the includes statements are active. this was the default. Does anyone have some ideas why it won't open, thanks.

Re: xampp installed but PHP file won't open

PostPosted: 11. February 2010 14:35
by LooseCannon
Hello and welcome BobNJ.

Try the url http://oemgirl/mainpage.php

With your host file having "127.0.01 oemgirl" and http-vhost file "ServerName oemgirl", one doesn't need to state localhost in the url.

Also, in your http-vhost file, consider UN-commenting (remove # suffix) the line "NameVirtualHost *:80". I've not yet had the time or urge to trully understand that, but I think it enable apache to look in your hosts file.