Re: [PHP] Getting line count of a text file

2007-09-12 Thread Frank J. Schima
Hi Gang, On Sep 12, 2007, at 1:58 PM, bruce wrote: if you're going to do the system approach, go ahead and use awk/cut... wc -l foo.txt | awk -F' ' '{print $1}' should work assuming you're on linux. I have solved the problem with this approach. Thanks for all the suggestions. FYI,

Re: [PHP] Getting line count of a text file

2007-09-12 Thread Frank J. Schima
ng and deploying on *nix, shell commands are fine with me. "Frank J. Schima" <[EMAIL PROTECTED]> wrote: > Hi all, > > > In PHP 5, I'm counting the number of lines in a text file using the > following code: > $myfile = file ( '/path/to/m

[PHP] Getting line count of a text file

2007-09-12 Thread Frank J. Schima
Hi all, In PHP 5, I'm counting the number of lines in a text file using the following code: $myfile = file ( '/path/to/myfile.txt'); $count = count ($myfile); However, sometimes it fails with the following error: PHP Fatal error: Allowed memory size of bytes exhaus

Re: [PHP] PHP 5.2.0 Session Handling Bug? Can someone test this please?

2006-11-16 Thread Frank J. Schima
The ID never changed for me. PHP 5.2.0 Apache 1.3.33 Mac OS X 10.4.8 On Nov 16, 2006, at 9:28 AM, Colin Guthrie wrote: I've noticed a bug with PHP 5.2.0 when dealing with sessions and posting quite large forms. I've attached a file that highlights the bug. Can people test this please and