Reply to Re: fwrite for log

Your name:

Reply:


Posted by C. (http://symcbean.blogspot.com/) on 01/08/08 16:09

On Jan 8, 9:03 am, Betikci Boris <pard...@gmail.com> wrote:
> On Jan 7, 10:36 am, Hanoi <hin...@inwind.it> wrote:
>
> > Hi,
>
> > I would like to have a php file that log informations sent by an image
> > request.
>
> > For logging, I use fwrite to write on a file.
>
> > If more requests are done on the same time, there could be a lost of
> > data because the file is open by one process and not available for the
> > other processes?
>
> > Thanks
>
> If you use OS as gnu/linux, cpu will handle each process sequently.

No it won't. At the level of PHP code they will effectively be running
concurrently, not sequentially. You can have multiple processes
writing to a file, but in the absence of a mutex there is no guarantee
that one write will not occurr in the middle of a seperate write -
large writes are not atomic.

C.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация