I have installed MAMP on my mac (OS X 10.9.5) and am unable to get php files to work correctly.
My php file looks like:
<?php
phpinfo();?>
This file is stored in the MAMP/htdocs folder.
When I load this in a browser (tried Chrome and Safari) with http://localhost:8888/test.php, I get the following errors:
From the php_error.log:
[19-Oct-2015 05:06:57 Europe/Berlin] PHP Parse error: syntax error, unexpected '?>', expecting identifier (T_STRING) in /Applications/MAMP/htdocs/test.php on line 9
From the apache_error.log:
[Sun Oct 18 22:49:25 2015] [error] [client ::1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store
It looks like the version of MAMP that I have installed is running Apache2.2. I'm new to this, and have researched a number of resources to get help. I'm wondering if I need to edit the apache config file somehow? Not sure what to change. Would appreciate some advice!
I should also add that when I load a test1.php file (http://localhost:8888/test1.php) that just has basic html in it, everything works fine.