Need Help - Trying to Access PHP from XAMPP - Beginner

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Need Help - Trying to Access PHP from XAMPP - Beginner

Postby BBar250 » 01. November 2010 07:41

So I'll start from the beginning and try to provide step by step details so hopefully someone can tell me where I'm going wrong...

- I've installed XAMPP for Mac OS X successfully
- I started Apache & mySQL successfully
- I opened TextEdit on Mac & saved a .php file (first on my Desktop)...then I moved it into the "htdocs" folder in XAMPP. (It asked me to authenticate - so i entered my password and it went into the htdocs folder successfully
- From everything I've read...this is where the .php file is supposed to be located. (see the php code i used as a test)
<?php

echo "hello"

?>
- I go to the localhost... "http://localhost/testerpage.php" and I get the following error message "Warning: failed to open stream: Permission denied in Unknown on line 0...Fatal Error: Unknown: Failed opening required '/Applications/XAMPP/xamppfiles/htdocs/testerpage.php' (include_path='.:/Applications/XAMPP/xamppfiles/lib/php/pear') in Unknown on line 0

What the heck is going on?

thanks a ton...

BB
BBar250
 
Posts: 1
Joined: 01. November 2010 07:26

Re: Need Help - Trying to Access PHP from XAMPP - Beginner

Postby MegaChriz » 01. November 2010 10:55

It's probable that the webserver does not have read access to the file. The webserver needs at least read permissions to read the file.

Read my post in this thread for information about how to give the webserver access to your file:
viewtopic.php?f=29&t=41776#p164981
MegaChriz
 
Posts: 158
Joined: 16. February 2009 15:04
Location: Amersfoort, The Netherlands
Operating System: Mac OS X


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 18 guests