note 71209 deleted from function.fgets by nlopess

From: Date: Sun, 11 Feb 2007 16:53:18 +0000
Subject: note 71209 deleted from function.fgets by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-123251@lists.php.net to get a copy of this message
Note Submitter: admin at lab-9 dot com ---- 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? ;-)

« previous php.notes (#123251) next »