RE: [PHP] Please, can you help me?
| From: | John Holmes | Date: | Sun, 05 May 2002 22:35:34 +0000 |
| Subject: | RE: [PHP] Please, can you help me? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96173@lists.php.net to get a copy of this message | ||
RTM... www.php.net/flock
---John Holmes...
> -----Original Message-----
> From: toycat@volny.cz [mailto:toycat@volny.cz]
> Sent: Friday, May 03, 2002 2:53 AM
> To: php-general@lists.php.net
> Subject: [PHP] Please, can you help me?
>
> Hello!
> I have a big problem and cannot find the answer anywhere, so please,
> help me if you can. When I use fwrite() function on webserver, it
> sometimes happens, that more then one user accesses the file and the
> result is, that the file is corrupted or truncated. A good example of
> this problem is webpage access counter. I know, that I can use MySQL
> to count accesses, but on some servers I can't. When I have this
> counter as a file on my server and read/write into it, there's only a
> question of time, when it corrupts itself. Please, can you help me to
> solve this problem? I think, that the easiest solution should be to
> prevent more that one user to write to that file, but I have no idea,
> how to do this. Or is there any other way to prevent that files from
> their corruption? I'll be very happy, if you help me with this
> problem.
> Thank you in advance.
> Miloslav Dornak
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php