Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linux/PHP question



To clarify not working: 

My hitcounter.txt file contains the value of one.  After i execute my php script that is supposed to incriment the value of the text file from 1 to 2 still contains the value of 1

Thanks 

-----Original Message-----
From: John Abreau <abreauj-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
Sent: Monday, November 03, 2008 8:54 PM
To: Myrle Francis <mafmanet-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
Cc: Discuss-mNDKBlG2WHs at public.gmane.org
Subject: Re: Linux/PHP question

It's hard to tell without any information of what "not working" means.

One obvious problem is that you don't allow for the possibility
that two or more instances could try to update the counter file
at the same time.

 Let's say you get 10 hits at roughly the same time, such that
all 10 read the file before any of them write to the file. The last
one to write the file increments the count by 1, and so the count
only goes up by 1 even though there were actually 10 hits.





On Mon, Nov 3, 2008 at 2:53 PM, Myrle Francis <mafmanet-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> HI,
>
>  I created a simple counter for my website and it doesn't seem to be
> working. I copied it from a windows/apache installation on my local windows
> machine and it works there (just not on linux)
>
> The file that contains the hit count hitcount.txt has the attributeof rw-
> rw- rw.
>
> The program itself counter.php has the attribute of rwx r-x r-x


[The entire original message is not included]







BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org