1

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 ?

Philipp Götz
  • 79
  • 1
  • 7

2 Answers2

6

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.

Community
  • 1
  • 1
elixenide
  • 44,308
  • 16
  • 74
  • 100
4

Since this is mac you might want to do

For Safari: Opt+Cmd+E to clear cache and Cmd+R to refresh

For Chrome: hold down Cmd and Shift key and then press R.

raidenace
  • 12,789
  • 1
  • 32
  • 35
  • This is a good answer, but it doesn't explain to the user what the problem is (caching). +1 if it is clarified. – elixenide Jan 31 '14 at 16:58
  • 1
    Well, the caching could be anywhere upstream, could be the browser, the ISP, could be a cache plugin, could be the cache ninjas out to take over the world...you never know :) – raidenace Jan 31 '14 at 17:01
  • True. It's just that caching is incredibly confusing for new developers (and not easy to figure out for old hands, either). +1 anyway for "cache ninjas out to take over the world" - that pushed me over the line. :) – elixenide Jan 31 '14 at 17:03