xampp installed but PHP file won't open

Problems with the Windows version of XAMPP, questions, comments, and anything related.

xampp installed but PHP file won't open

Postby BobNJ » 10. February 2010 20:24

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

## 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

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.
Posts: 1
Joined: 10. February 2010 19:38

Re: xampp installed but PHP file won't open

Postby LooseCannon » 11. February 2010 14:35

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.
User avatar
Posts: 162
Joined: 18. September 2007 12:07
Location: Hampshire, UK

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 83 guests