Forum Moderators: phranque
I have recently installed the free version of MAMP on my Mac G5 because I am about to learn PHP/Mysql.
Everything seems fine with the install, the lights are on green, the MAMP home page is displaying OK on Safari.
However when I try to open a PHP file I have created myself from within the htdocs folder, Safari just displays the code.
I also have trouble with Dreamweaver CS3 on this matter.
Every time I try to preview a file in Safari it comes up with the '...you need a testing server. Would you like to specify one now?' error.
Unfortunately though I thought I had specified this in the Testing Server Pallet when I set my site up in Dreamweaver.
The settings I have put in for this are as follows:
Server Model: PHP MySQL
Access: Local/Network
Testing server Folder: HD:Applications:MAMP:htdocs
URL Prefix: [localhost:8888...]
Obviously I would be happy if I could just open PHP files in Safari from the htdocs folder but if I could preview these direct from Dreamweaver that would be perfect.
Please help if you can.
Regards
Erdy
you probably need to set up apache to listen to port 8888 [httpd.apache.org].
then if/when you see it served as php source, there are a few recent threads here and in the WebmasterWorld php forum about setting up php on apache.
my Apache is pointing at port 8888.
When I start MAMP up, the home page opens in Safari and that's a PHP file on the local disk. So why don't any other PHP files open when they are in the same folder as the MAMP home page?
I though the whole point of MAMP was so that I could start testing PHP files on my local disk?
Could any of this be because of the files doubling up in the User profile on the Mac OS?
Help!
if you open your file by using a file selection dialog, you are using file: protocol which doesn't use the server.
if you navigate to the file by clicking a http: link or by entering a http: url in the browser, then you are getting your php file after processing by the server.
if you want your other php files served through apache you should type [localhost...] in your browser...