I'm using MAMP server and wondering why changes I make to the PHP files are not instantaneously displayed when I page refresh (in browser). Is there a way to set this up? There are no caching settings on MAMP. Either I have to wait 20 seconds or stop and restart the server.
Here's the solution that worked for me: Go to preferences in MAMP, and change the Apache Port to 80, and the MYSQL port to 3306, then restart the server and try loading your PHP.
The main reason people use MAMP is to be able to run PHP applications on their local machines.
MAMP comes free of charge, and is easily installed.
The solution is to comment out lines in the php.ini file which can be found in /MAMP Directory/bin/php/php5.5.3/conf/php.ini
Comment out Opcache:
[OPcache] ;zend_extension="/Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212/opcache.so" ; opcache.memory_consumption=128 ; opcache.interned_strings_buffer=8 ; opcache.max_accelerated_files=4000 ; opcache.revalidate_freq=60 ; opcache.fast_shutdown=1 ; opcache.enable_cli=1
Documentation (yes it started in 5.5):
http://www.php.net/manual/en/intro.opcache.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With