note 71209 added to function.fgets
| From: | admin at lab-9 dot com | Date: | Thu, 16 Nov 2006 15:01:37 +0000 |
| Subject: | note 71209 added to function.fgets | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119804@lists.php.net to get a copy of this message | ||
In response to:
tavernadelleidee[italy]
09-Mar-2006 12:44
Usually big log files should not be processed with PHP. the default memory allocation size (usually
from 8mb to 16mb) is too small to process such files. Even if you use a quite evolved script, after
all you'll have to deal with timeouts generated by the clientbrowser and/or the server.
It's extremely dangerous playing around with max_execution_time and other - often
underestimated - memory-, time-, calculationexpensive configuration options.
If you really need to work on such big logs I strongly encourage You to use a database for storage
or rotate the files (i.e. by reaching filesize of 512kb, for each user connected, ...) while
they're being generated, or at process time.
PHP definitly is NOT designed to parse logfiles. The best way is still a unix shell with common
tools or editors like tail, vi and often there's the only way of using those tools.
For small scripts that use database logging everyone may feel free to mail me (devel at lab minus
nine dot com). You're ain't going to reinvent the wheel, are you? ;-)
----
Server IP: 192.35.244.50
Probable Submitter: 81.223.54.114
----
Manual Page -- http://www.php.net/manual/en/function.fgets.php
Edit -- https://master.php.net/note/edit/71209
Del: integrated -- https://master.php.net/note/delete/71209/integrated
Del: useless -- https://master.php.net/note/delete/71209/useless
Del: bad code -- https://master.php.net/note/delete/71209/bad+code
Del: spam -- https://master.php.net/note/delete/71209/spam
Del: non-english -- https://master.php.net/note/delete/71209/non-english
Del: in docs -- https://master.php.net/note/delete/71209/in+docs
Del: other reasons-- https://master.php.net/note/delete/71209
Reject -- https://master.php.net/note/reject/71209
Search -- https://master.php.net/manage/user-notes.php