Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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
What is C:\xampp\htdocs\index.php ? – SamT Jun 4 '11 at 23:09
add comment (requires an account with 50 reputation)

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

4 Answers

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
add comment (requires an account with 50 reputation)

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
1  
... 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
add comment (requires an account with 50 reputation)

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.

<?PHP
    phpinfo();
?>
share|improve this answer
add comment (requires an account with 50 reputation)

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

share|improve this answer
add comment (requires an account with 50 reputation)

Your Answer

 
discard

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