Re: [PHP] memory allocation error

2012-11-13 Thread Carol Peck
On 11/13/2012 6:29 AM, Matijn Woudt wrote: On Tue, Nov 13, 2012 at 12:23 AM, Carol Peck > wrote: On 11/12/2012 11:51 AM, Matijn Woudt wrote: On Mon, Nov 12, 2012 at 3:17 PM, Carol Peck mailto:carolap...@gmail.com>> wrote: Sebastian,

Re: [PHP] memory allocation error

2012-11-13 Thread Matijn Woudt
On Tue, Nov 13, 2012 at 12:23 AM, Carol Peck wrote: > > On 11/12/2012 11:51 AM, Matijn Woudt wrote: > > > On Mon, Nov 12, 2012 at 3:17 PM, Carol Peck wrote: > >> Sebastian, >> Yes, I do , but this particular error never gets into my custom handler. >> I have also set it so that fatal errors fal

Re: [PHP] memory allocation error

2012-11-12 Thread Carol Peck
On 11/12/2012 11:51 AM, Matijn Woudt wrote: On Mon, Nov 12, 2012 at 3:17 PM, Carol Peck > wrote: Sebastian, Yes, I do , but this particular error never gets into my custom handler. I have also set it so that fatal errors fall through, and that

Re: [PHP] memory allocation error

2012-11-12 Thread Matijn Woudt
On Mon, Nov 12, 2012 at 3:17 PM, Carol Peck wrote: > Sebastian, > Yes, I do , but this particular error never gets into my custom handler. > I have also set it so that fatal errors fall through, and that doesn't > seem to make any difference (again, probably because it never gets there). > > Caro

Re: [PHP] memory allocation error

2012-11-12 Thread Jim Lucas
On 11/12/2012 8:54 AM, Carol Peck wrote: Jim, I just found that the die didn't fix it after all - just ran into it again. So still looking for ideas! thanks, Carol Then it must be something in either your code or the way PHP is doing some garbage collection with the libs you are using. --

Re: [PHP] memory allocation error

2012-11-12 Thread Jim Lucas
On 11/12/2012 7:50 AM, Carol Peck wrote: Jim, Thanks for your idea - using die prevents it from coming up. As I mentioned, it is rather random so sometimes hard to verify. My auto_prepend and auto_append have no value in php.ini. I'm wondering why you suggested that? If something was injec

Re: Re: [PHP] memory allocation error

2012-11-12 Thread James
> Original Message >From: James >To: "Carol Peck" , "Jim Lucas" >Cc: php-general@lists.php.net >Sent: Mon, Nov 12, 2012, 12:53 PM >Subject: Re: [PHP] memory allocation error > >This could be an issue with the library you're using,

Re: [PHP] memory allocation error

2012-11-12 Thread James
This could be an issue with the library you're using, adodb, I'd check to see if it has any debugging options to enable. I'm not familiar with it at all but that may be helpful. I'd also check out adodbs bug tracker, if one exists. Another suggestion would be use a profiler, such as xdebug, I be

Re: [PHP] memory allocation error

2012-11-12 Thread Carol Peck
Jim, I just found that the die didn't fix it after all - just ran into it again. So still looking for ideas! thanks, Carol On 11/12/2012 8:09 AM, Jim Lucas wrote: On 11/11/2012 08:45 AM, Carol Peck wrote: Hi all, I've been chasing around a memory allocation error for some time and can't figure

Re: [PHP] memory allocation error

2012-11-12 Thread Carol Peck
Jim, Thanks for your idea - using die prevents it from coming up. As I mentioned, it is rather random so sometimes hard to verify. My auto_prepend and auto_append have no value in php.ini. I'm wondering why you suggested that? Best, Carol On 11/12/2012 8:09 AM, Jim Lucas wrote: On 11/11/

Re: [PHP] memory allocation error

2012-11-12 Thread Jim Lucas
On 11/11/2012 08:45 AM, Carol Peck wrote: Hi all, I've been chasing around a memory allocation error for some time and can't figure it out. It is somewhat random - I can run the script 3 times and then it will happen, or sometimes the first time. It happens at the very end of a script, actually

Re: [PHP] memory allocation error

2012-11-12 Thread Carol Peck
Sebastian, Yes, I do , but this particular error never gets into my custom handler. I have also set it so that fatal errors fall through, and that doesn't seem to make any difference (again, probably because it never gets there). Carol On 11/11/2012 11:16 AM, Sebastian Krebs wrote: Hi, Do yo

[PHP] memory allocation error

2012-11-11 Thread Carol Peck
Hi all, I've been chasing around a memory allocation error for some time and can't figure it out. It is somewhat random - I can run the script 3 times and then it will happen, or sometimes the first time. It happens at the very end of a script, actually after the script has finished running.

Re: [PHP] memory allocation

2012-09-25 Thread Marcelo Bianchi
On 09/25/2012 02:40 PM, shiplu wrote: Also if the final data on presentation layer is very small you can calculate it in mysql using stored procedure. okay, also something to try. thank you ! regards, marcelo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

Re: [PHP] memory allocation

2012-09-25 Thread shiplu
I would like to see how you are reading data from database? There are many ways to reduce memory usage. Here is a very common way reduce memory. instead of $res = mysql_query("select * from table1 limit 1000"); while($row = mysql_fetch_assoc($res)){ /// process row. } Do this, for($x = 0

Re: [PHP] memory allocation

2012-09-25 Thread Marcelo Bianchi
Uhm, Okay, I get it ... I am loading all at once, will try this out. Here is what I do: -- begin code $network = "IA"; $station = "BJI"; $channel = "BHZ"; $year = 2011; $top = NULL; $result = mysql_query('select '.$year.' as year, net, station, loc, channel, start_day, start_time, end_day, e

Re: [PHP] memory allocation

2012-09-25 Thread Marcelo Bianchi
Hi Matijn, That is good test, to install php 32bit side to side with the 64bit to test. Will see how hard is to accomplish that. regards, Marcelo On 09/25/2012 01:58 PM, Matijn Woudt wrote: On Tue, Sep 25, 2012 at 12:49 PM, Marcelo Bianchi wrote: Dear list, I developed a script that have

Re: [PHP] memory allocation

2012-09-25 Thread Matijn Woudt
On Tue, Sep 25, 2012 at 12:49 PM, Marcelo Bianchi wrote: > Dear list, > > I developed a script that have to create considerable array of integer > numbers in memory. Currently my script has to accommodate in memory two > arrays of around 120.000 numbers (for one year of data, I would like to > rea

[PHP] memory allocation

2012-09-25 Thread Marcelo Bianchi
Dear list, I developed a script that have to create considerable array of integer numbers in memory. Currently my script has to accommodate in memory two arrays of around 120.000 numbers (for one year of data, I would like to reach a 2 years per query) that are loaded from a mysql server. I

Re: [PHP] Memory Allocation Error

2007-11-06 Thread heavyccasey
Thank you! That works. On Nov 6, 2007 12:23 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > > Hi! > > > > I have a script that reads a 120 MB remote file. This raises a Memory > > Allocation Error unless I use: > > ini_set('memory_limit', '130M'); > > > > I doubt th

Re: [PHP] Memory Allocation Error

2007-11-06 Thread Per Jessen
[EMAIL PROTECTED] wrote: > Hi! > > I have a script that reads a 120 MB remote file. This raises a Memory > Allocation Error unless I use: > ini_set('memory_limit', '130M'); > > I doubt this is good for my server... I tried both fopen and > file_get_contents. This used to work fine in PHP 4

[PHP] Memory Allocation Error

2007-11-05 Thread heavyccasey
Hi! I have a script that reads a 120 MB remote file. This raises a Memory Allocation Error unless I use: ini_set('memory_limit', '130M'); I doubt this is good for my server... I tried both fopen and file_get_contents. This used to work fine in PHP 4 until I upgraded to PHP 5. Any ideas? Th

Re: [PHP] memory allocation problems with fgets

2007-01-15 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-15 16:43:50 +: > Hi, > I have a script parsing the lines of a (rather large) file: > > while (!feof($outPluginfh)) { > $outPlugin = fgets ($outPluginfh,1024); > # process $outPlugin here... > > } > > Now, with large files I was running into an memor

[PHP] memory allocation problems with fgets

2007-01-15 Thread Maurizio Molina
Hi, I have a script parsing the lines of a (rather large) file: while (!feof($outPluginfh)) { $outPlugin = fgets ($outPluginfh,1024); # process $outPlugin here... } Now, with large files I was running into an memory allocation error (after 16MB of allocation..). It looks that php is

Re: [PHP] PHP & Memory Allocation (checked via TOP)

2006-10-31 Thread Rasmus Lerdorf
$str is 10 bytes then you repeat it 200 times That gives you 2000 bytes. That's 20M not 10M -Rasmus Cabbar Duzayak wrote: > Hi, > > I have written a simple test program to see how php allocates memory. > Test code allocates ~10 Meg of RAM in an array within a loop till it > runs out of

Re: [PHP] PHP & Memory Allocation (checked via TOP)

2006-10-31 Thread Jon Anderson
Cabbar Duzayak wrote: Hi, I have written a simple test program to see how php allocates memory. Test code allocates ~10 Meg of RAM in an array within a loop till it runs out of memory as: $str = rand(65, 95) . rand(65, 95) . rand(65, 95) . rand(65, 95) . rand(65, 95); $aa[] = str_repeat($str,

[PHP] Re: PHP & Memory Allocation (checked via TOP)

2006-10-31 Thread Cabbar Duzayak
As a side note, even though user is shown as apache, this code was executed from command line. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP & Memory Allocation (checked via TOP)

2006-10-31 Thread Cabbar Duzayak
Hi, I have written a simple test program to see how php allocates memory. Test code allocates ~10 Meg of RAM in an array within a loop till it runs out of memory as: $str = rand(65, 95) . rand(65, 95) . rand(65, 95) . rand(65, 95) . rand(65, 95); $aa[] = str_repeat($str, 200); What I don'