Philipp Götz Philipp Götz - 2 months ago 8
PHP Question

PHP Reload Time

Hello I have a Problem with my PHP. Im coding in two ways:


  1. I upload a File to my FTP Sever

  2. Save it Local and run it with MAMP (OSX)



But in both ways i save/upload the new file but it takes about 2-5 Min until i can see the changes.

Example:

Old PHP:

<?php
echo "test";
?>


New PHP:

<?php
echo "test2";
?>


So i save the second file but until i see the second text it may taxes aboout 2-5 Minutes?

Can i change something in my PHP Info file or something else ? Or is there another way to code in PHP ?

Answer

This sounds like a caching problem. Try hitting Cmd+Shift+R* and see if the changes are instant then. If that's the problem, see this answer for how to disable the cache to prevent this problem.

Also, as loveNoHate points out in the comments, it is possible that this is a server- or ISP-side caching problem. Because you have the same problem running it locally on MAMP, however, it sounds like a browser issue.

* The Mac OS X shortcut. For future visitors: you would use Ctrl+F5 for Windows.

Comments