4

I install WAMP on windows 7 and never touch the configuration at all.

But my WAMP seems slow in updating the content.

For example I have a php file that print A, open the browser and successfully printed A.

Then I replace the A into B, save the php, open the browser but the browser still print A, keep refreshing it until 1 or 2 minutes, then the browser finally print B.

Is that normal? Any way to make it faster?

Note:

  • Changing the browser doesn't change anything (still A until next 1 or 2 mins)
  • Clearing browser's cache doesn't make any change too
  • Ctrl + F5 also doesn't work
  • Restarting the apache does help. It's faster than waiting for 1 mins, But it's pain to do it everytime I update my php
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
Eternity Neet
  • 179
  • 4
  • 17

2 Answers2

5

I think BITNAMI comes with opcache configured to be on and active.

Edit the php.ini file and change option opcache.enable from 1 to 0

Using opcache is fine for a LIVE server, but has the potential to do exactly what you are reporting to a development server

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • But is there a way beside changing it directly from the `php.ini`? I tried putting `ini_set('opcache.enable', '0');` in the php file but it doesn't work – Eternity Neet Jun 30 '16 at 08:38
  • 1
    See this answer http://stackoverflow.com/a/21556994/2310830 and this one as well http://stackoverflow.com/a/21590668/2310830 – RiggsFolly Jun 30 '16 at 08:42
0

After disabling pagespeed in httpd.conf and OPCache in php.ini all php files are still being updated 1 time per a minute, and changes are taking effect only after some timeout.

This could be solved by executing in php code the following function:

opcache_reset();

Thanks RafaSashi! https://stackoverflow.com/a/42296784