Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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