note 71208 added to function.fgets
| From: | admin at lab-9 dot com | Date: | Thu, 16 Nov 2006 14:57:28 +0000 |
| Subject: | note 71208 added to function.fgets | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119803@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 configurations on well.
If you really need to work on such big logs I strongly encourage to use a database for storage or
rotate the files (i.e. by reaching filesize of 512kb) 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, ...
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/71208
Del: integrated -- https://master.php.net/note/delete/71208/integrated
Del: useless -- https://master.php.net/note/delete/71208/useless
Del: bad code -- https://master.php.net/note/delete/71208/bad+code
Del: spam -- https://master.php.net/note/delete/71208/spam
Del: non-english -- https://master.php.net/note/delete/71208/non-english
Del: in docs -- https://master.php.net/note/delete/71208/in+docs
Del: other reasons-- https://master.php.net/note/delete/71208
Reject -- https://master.php.net/note/reject/71208
Search -- https://master.php.net/manage/user-notes.php