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

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

Where does MAMP keep its php.ini?

Note: If this doesn’t help, check below for Ricardo Martins’ answer. Create a PHP script with <?php phpinfo() ?> in it, run that from your browser, and look for the value Loaded Configuration File. This tells you which php.ini file PHP is using in the context of the web server.

Restoring deleted ‘root’ user and password for MySQL

I have a quick and dirty way Get someone with SysAdmin rights and do the following: Add ‘skip-grant-tables’ to my.cnf under the [mysqld] section restart mysql type mysql with no password and hit enter Run This: DELETE FROM mysql.user WHERE user=”root” AND host=”localhost”; INSERT INTO mysql.user SET user=”root”, host=”localhost”, password = Password(‘whatevernewpassword’), Select_priv = ‘y’, … Read more

How to prevent http file caching in Apache httpd (MAMP)

Tried this? Should work in both .htaccess, httpd.conf and in a VirtualHost (usually placed in httpd-vhosts.conf if you have included it from your httpd.conf) <filesMatch “\.(html|htm|js|css)$”> FileETag None <ifModule mod_headers.c> Header unset ETag Header set Cache-Control “max-age=0, no-cache, no-store, must-revalidate” Header set Pragma “no-cache” Header set Expires “Wed, 11 Jan 1984 05:00:00 GMT” </ifModule> </filesMatch> … Read more