Dorign
08-04-2007, 11:10 PM
I set up a simple PHP counter on my forum last night, using a simple .txt file as the source of data, properly CHMODed and all of the good stuff. It was counting just fine, I tested it about an hour. I refreshed, closed browser, came back later, visited normally, etc. etc.. all was good. The count was at 1500ish when I closed for the night and went to bed.
I opened my site this morning, and the count was back at 15. I modified the data to 1999 to see if maybe it reset when it tried to get to 2000, but it counted just fine. I'm not really sure what caused it, but it always seems to happen. I've had it happen to me on several different servers and I've always used a different PHP counter each time (I don't know how to write it myself, I can only tweak PHP).
Is this normal? Does anyone know why? I figured if it used a database instead of a .txt or .dat it wouldn't happen, but I've tried several different database using counters and haven't been able to get it to work from a template (even though I used the plugin system and what not).
Any help would be greatly appreciated. I can't believe something as simple as a counter is giving me more grief than backing up databases and complex modifications, heh.
I opened my site this morning, and the count was back at 15. I modified the data to 1999 to see if maybe it reset when it tried to get to 2000, but it counted just fine. I'm not really sure what caused it, but it always seems to happen. I've had it happen to me on several different servers and I've always used a different PHP counter each time (I don't know how to write it myself, I can only tweak PHP).
Is this normal? Does anyone know why? I figured if it used a database instead of a .txt or .dat it wouldn't happen, but I've tried several different database using counters and haven't been able to get it to work from a template (even though I used the plugin system and what not).
Any help would be greatly appreciated. I can't believe something as simple as a counter is giving me more grief than backing up databases and complex modifications, heh.