PHP files are downloaded by browser instead of processed by local dev server (MAMP)

I’ve had a similar issue a couple times and renaming the file did not work for me. With OS X Lion I found the right configuration is this: <IfModule php5_module> AddType application/x-httpd-php .php <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> AddType application/x-httpd-php-source .phps <IfModule dir_module> DirectoryIndex index.php index.html </IfModule> </IfModule> The magic that made it work for … Read more

Having problems while try to install OAUTH with PECL in MAMP on mac OS lion

I know this is old but I found this question while having a similar issue. MAMP doesn’t ship with a bunch of the PHP sources Download MAMP components and configure URL: http://www.mamp.info/en/downloads/index.html (i.e. MAMP_components_2.0.2.zip) Unpack your MAMP_components_2.0.2.zip Identify your php-5.x.x.tar.gz file (where 5.x.x is your version of PHP) If you are using php > 5.4.10 … Read more

How to use MAMP’s version of PHP instead of the default on OSX

I have created a symlink at the original php location. 1. Locate your osx php version with: which php The result should be: /opt/local/bin/php 2. Backup (move) your original php binary: sudo mv /opt/local/bin/php /opt/local/bin/php.bak 3. Create the symlink: sudo ln -s /Applications/MAMP/bin/php/php5.4.4/bin/php /opt/local/bin/php 4. Run your new php version: php -v PS: In order … Read more

Stop caching for PHP 5.5.3 in MAMP

Disable OPCache MAMP now turns on OPCache by default, you can disable it by editing your php.ini file. Make sure you edit the correct php.ini. I was running into the same problem myself. MAMP with PHP version 5.5.3 runs OPcache by default, but you can’t turn it off in the GUI like you can with … Read more