Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed xampp this evening and none of my PHP pages will display. I am storing all my pages in the htdocs folder as directed too and calling via http://localhost/index.php and nothing appears? All systems are online. Is there anything else that should have been done before copying over my pages?

Any ideas? Very new to php and xampp! Thank you

share|improve this question

migrated from stackoverflow.com Jun 6 '11 at 13:48

This question came from our site for professional and enthusiast programmers.

What is C:\xampp\htdocs\index.php ? – SamT Jun 4 '11 at 23:09

You may have error reporting turned off in your php.ini file, and it could be something like a database error causing your pages to blank.

I would suggest putting this code into test.php and navigating to it.

share|improve this answer

You might consider setting up vhosts with Apache so you don't have to copy your files anywhere.

Here is a link to a tutorial for setting up vhosts with xampp.

share|improve this answer

The problem is php start tag. Write it correctly and work. Not <? but <?php at all tags on the page.

share|improve this answer

What system are you using, Win, Mac or Linux? On Mac when I try http://localhost/ it redirects to http://localhost/xampp/ and then there's the default welcome page.

Also, if you put you page(s) in a folder (abc_folder/index.php for example) under htdocs, you'll have to call it http://localhost/abc_folder/index.php

share|improve this answer
Thank you, i'm using a MAC. I've tried putting my files in there in another file aswell but nothing displays! I get this error: Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/Applications/XAMPP/xamppfiles/htdocs/XXXXXXX/index.php' (include_path='.:/Applications/XAMPP/xamppfiles/lib/php:/Applications/XAMPP/xamp‌​pfiles/lib/php/pear') in Unknown on line 0 – ez87 Jun 5 '11 at 8:46
... did you make sure file permissions are set correctly? Did you try a simple 'Hello World' example first? – vector Jun 5 '11 at 13:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.