Xampp not displaying PHP pages in htdocs due to "failed to open stream: Permission denied"
Solution 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
Solution 2
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();
?>
Related videos on Youtube
Stephen Ostermiller
Updated on September 18, 2022Comments
-
Stephen Ostermiller over 1 year
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:/Applications/XAMPP/xamppfiles/lib/php/pear'
) in Unknown on line 0Any ideas? Very new to PHP and Xampp!
-
Admin almost 13 yearsWhat is C:\xampp\htdocs\index.php ?
-
-
Admin almost 13 yearsThank 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
-
vector almost 13 years... did you make sure file permissions are set correctly? Did you try a simple 'Hello World' example first?