1

I am running WAMP as a local server for the computers in the my network.

The problem is that when I try to do any operations to the database from these computers, it seems as if they don't happen, even though they do.

I have a mysql table called person with the fields id,lastname,name when I try to add a new person or edit one of them everything seems fine, but when i check to see if the person has been added/edited it seems as if it hasn't, even tough when i check into my database, the changes have been done.

Digging a little further, I realized that when I access to my system via http://localhost/system/ all the changes to the database are reflected immediately, but when I access to the system via IP address http://12.12.123.12/system/, the updates doesn't show up until i close the webpage or hit refresh about 5 times.

httpd.conf

ServerRoot "c:/wamp/bin/apache/apache2.2.21"
Listen 80
ServerName localhost:80
DocumentRoot "c:/wamp/www/"
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
    Allow from all

</Directory>

So long story short everything is working on the database side, and when i view my page via localhost everything works fine, the problem is when i access to it from the IP address

FINAL UPDATE
My application had an <iframe> that contained all the necessary forms to display the information, turns out it was the frame the one that wasn't being refreshed so it showed the outdated info. I had to add 2 lines of code so that it wouldn't cache the information and always show the current information. Here is what i added:

header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
HopelessN00b
  • 54,273

1 Answers1

2

If your DB reflects the changes immediately, and accessing the site via localhost reflects them immediately, but changes are slow to appear when accessing externally, my first reaction is that you need to check for caching.

This can get you started with regards to Apache Caching: http://httpd.apache.org/docs/2.2/caching.html

If you are serving through Varnish, that is a cache and reverse-proxy tool as well. Also, your browser may be caching on you, not to mention if you are going through a standard web proxy

gWaldo
  • 12,027