1

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?

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:/App‌​lications/XAMPP/xamp‌​pfiles/lib/php/pear'‌​) in Unknown on line 0

Any ideas? Very new to PHP and Xampp!

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
1

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();
?>
1

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

  • 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/xamppfiles/lib/php/pear') in Unknown on line 0 – ez87 Jun 5 '11 at 8:46
  • 2
    ... 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
0

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.

0

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