Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

John Imperio
John Imperio
9,486 Points

MAMP / PHP (5.5.3) Display Errors On - browser cache/not refreshing properly...

I'm having some trouble with my browsers (Chrome & Safari). They seem to be not refreshing properly - I edited php.ini file on MAMP (both inside bin and conf folders and restarted servers) to display errors and I intentionally wrote some invalid php code to test but whenever I hit refresh, the page would not immediately show the error not until I delete the cache. Oddly, sometimes it does and when it finally does show hthe error and I correct the php code.. I'd end up with the refresh problem again.. hope that makes sense..

1 Answer

John Imperio
John Imperio
9,486 Points

UPDATE: Ok, so I found the answer - apparently it was the OPCache setting in the PHP.ini file.. for those who are experiencing the same problem here's the solution

You need to comment out these OPCache lines and make sure to restart your servers

[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