Joe Isaacson
Joe Isaacson

Reputation: 4132

Why is my PHP file using MAMP not refreshing?

I have a pretty standard PHP file that I use with MAMP to replicate apache on my local machine.

But for some reason when I make a change to the php file, the changes are not reflected even when I hard refresh in Chrome (multiple times.)

Even simple changes to the HTML are not reflected.

I changed the Document Root, restarted Apache and made sure PHP wasn't running any cache extensions in MAMP.

Upvotes: 14

Views: 17640

Answers (2)

wjdennen
wjdennen

Reputation: 451

I just ran into this. I found the answer in another thread -- it's the OPcode caching, which you can disable by commenting out some lines in php.ini.

See: https://stackoverflow.com/a/19268769

enter image description here

Upvotes: 28

Jeet
Jeet

Reputation: 1040

You can also restart apache

sudo service apache2 restart

This should also reload your modified scripts.

Upvotes: -2

Related Questions