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

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

Re: [PHP] Memory limit Problem

2011-06-27 Thread Richard Quadling
On 27 June 2011 14:16, Graham Drabble wrote: > On 23 Jun 2011 usene...@drabble.me.uk (Graham Drabble) wrote in > news:xns9f0d980579291grahamdrabbleline...@id-77355.user.dfncis.de: > >> On 23 Jun 2011 ja...@nixsecurity.org wrote in >> news:23a261c.efc7a3a4b4a0468ab221437b2018e...@webmail.lomag.net:

Re: [PHP] Memory limit Problem

2011-06-27 Thread Lester Caine
Graham Drabble wrote: From phpinfo() > > upload_max_filesize 800M 800M > post_max_size 1000M 1000M > > (fwiw the file I'm uploading is ~85MB) Any ideas from anyone? FWIW, the setup works on another server but doesn't work on this server. The upload_max_filesize, post_max_size and memory_lim

Re: [PHP] Memory limit Problem

2011-06-27 Thread Graham Drabble
On 23 Jun 2011 usene...@drabble.me.uk (Graham Drabble) wrote in news:xns9f0d980579291grahamdrabbleline...@id-77355.user.dfncis.de: > On 23 Jun 2011 ja...@nixsecurity.org wrote in > news:23a261c.efc7a3a4b4a0468ab221437b2018e...@webmail.lomag.net: > >> >> Check the value of the upload_max_filesi

Re: [PHP] Memory limit Problem

2011-06-23 Thread Graham Drabble
On 23 Jun 2011 ja...@nixsecurity.org wrote in news:23a261c.efc7a3a4b4a0468ab221437b2018e...@webmail.lomag.net: > > Check the value of the upload_max_filesize and post_max_size > directives in the php.ini. >From phpinfo() upload_max_filesize 800M 800M post_max_size 1000M 1000M (fwiw the fil

Re: [PHP] Memory limit Problem

2011-06-23 Thread james
Check the value of the upload_max_filesize and post_max_size directives in the php.ini. > Original Message >From: Graham Drabble >To: php-general@lists.php.net >Sent: Thu, Jun 23, 2011, 9:46 AM >Subject: [PHP] Memory limit Problem > >Hi, > >I've got a problem with setting the memory l

Re: [PHP] Memory limit Problem

2011-06-23 Thread Peet Grobler
On 6/23/2011 3:29 PM, Graham Drabble wrote: > (ie it seems I only have 128M available). > > There's plenty of RAM on the server. > > Any ideas? Check for the upload_max_filesize parameter. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] memory usage/release & GC

2010-12-31 Thread Tommy Pham
On Fri, Dec 31, 2010 at 2:02 AM, Peter Lind wrote: > > On Dec 31, 2010 6:20 AM, "Tommy Pham" wrote: >> >> Hi folks, >> >> With the recent thread about password & security, I wrote a small quick >> script to generate a random or all possible passwords based on certain >> parameters for a brute for

Re: [PHP] memory usage/release & GC

2010-12-31 Thread Peter Lind
On Dec 31, 2010 6:20 AM, "Tommy Pham" wrote: > > Hi folks, > > With the recent thread about password & security, I wrote a small quick > script to generate a random or all possible passwords based on certain > parameters for a brute force use. On a very long running execution for a > complex pass

Re: [PHP] memory efficient hash table extension? like lchash ...

2010-01-25 Thread J Ravi Menon
> values were stored, the APC storage began to slow down *dramatically*. I > wasn't certain if APC was using only RAM or was possibly also writing to > disk. Performance tanked so quickly that I set it aside as an option and > moved on. IIRC, i think it is built over shm and there is no disk back

Re: [PHP] memory efficient hash table extension? like lchash ...

2010-01-25 Thread D. Dante Lorenso
J Ravi Menon wrote: PHP does expose sys V shared-memory apis (shm_* functions): http://us2.php.net/manual/en/book.sem.php I will look into this. I really need a key/value map, though and would rather not have to write my own on top of SHM. If you already have apc installed, you could als

Re: [PHP] memory efficient hash table extension? like lchash ...

2010-01-25 Thread J Ravi Menon
PHP does expose sys V shared-memory apis (shm_* functions): http://us2.php.net/manual/en/book.sem.php If you already have apc installed, you could also try: http://us2.php.net/manual/en/book.apc.php APC also allows you to store user specific data too (it will be in a shared memory). Haven't tr

Re: [PHP] memory efficient hash table extension? like lchash ...

2010-01-24 Thread D. Dante Lorenso
shiplu wrote: On Sun, Jan 24, 2010 at 3:11 AM, D. Dante Lorenso wrote: All, I'm loading millions of records into a backend PHP cli script that I need to build a hash index from to optimize key lookups for data that I'm importing into a MySQL database. The problem is that storing this data in

Re: [PHP] memory efficient hash table extension? like lchash ...

2010-01-23 Thread shiplu
On Sun, Jan 24, 2010 at 3:11 AM, D. Dante Lorenso wrote: > All, > > I'm loading millions of records into a backend PHP cli script that I > need to build a hash index from to optimize key lookups for data that > I'm importing into a MySQL database.  The problem is that storing this > data in a PHP

Re: [PHP] Memory profiling tools

2008-06-23 Thread Chris
Larry Garfield wrote: > Hi all. I have a rather large application on which I need to do some memory > performance profiling and optimization. Basically it's eating up more RAM > than it should and I'm not sure why. I have some suspects, but nothing > concrete. > > Are there any (open source)

Re: [PHP] Memory cache problem

2008-06-14 Thread Stut
On 14 Jun 2008, at 01:02, tedd wrote: At 11:47 PM +0100 6/13/08, Stut wrote: On 13 Jun 2008, at 23:20, R B wrote: I search in both caches, and the video appears in the memory cache. Sorry, but that doesn't answer the question of why you/he doesn't want it to be cached. If he's trying to pro

Re: [PHP] Memory cache problem

2008-06-13 Thread Nathan Nobbe
On Fri, Jun 13, 2008 at 8:02 PM, tedd <[EMAIL PROTECTED]> wrote: > At 11:47 PM +0100 6/13/08, Stut wrote: > >> On 13 Jun 2008, at 23:20, R B wrote: >> >>> I search in both caches, and the video appears in the memory cache. >>> >> >> Sorry, but that doesn't answer the question of why you/he doesn't

Re: [PHP] Memory cache problem

2008-06-13 Thread tedd
At 11:47 PM +0100 6/13/08, Stut wrote: On 13 Jun 2008, at 23:20, R B wrote: I search in both caches, and the video appears in the memory cache. Sorry, but that doesn't answer the question of why you/he doesn't want it to be cached. If he's trying to protect the videos from being copied then

Re: [PHP] Memory cache problem

2008-06-13 Thread Stut
On 13 Jun 2008, at 23:20, R B wrote: The video manual it´s not for me, it´s for a customer and he don´t want to be cached in the client machine... If you put in firefoxin the url area: about:cache , firefox display the Memory cache and the Disk cache... I search in both caches, and the v

Re: [PHP] Memory cache problem

2008-06-13 Thread R B
The video manual it´s not for me, it´s for a customer and he don´t want to be cached in the client machine... If you put in firefoxin the url area: about:cache , firefox display the Memory cache and the Disk cache... I search in both caches, and the video appears in the memory cache. On Fri, J

Re: [PHP] Memory cache problem

2008-06-13 Thread Stut
On 13 Jun 2008, at 23:12, R B wrote: I´m making a video manual, but i don´t want to be cached in the client machine. I make a script like this: With Internet explorer the script works fine. But Firefox have two types of cache: Memory cache and disk cache. With firefox disk cache, the scrip

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Andrew Ballard
On Wed, Apr 16, 2008 at 12:00 PM, David Giragosian <[EMAIL PROTECTED]> wrote: > > On 4/16/08, tedd <[EMAIL PROTECTED]> wrote: > > > > At 10:53 AM -0400 4/16/08, Andrew Ballard wrote: > > > > > On Wed, Apr 16, 2008 at 9:59 AM, tedd <[EMAIL PROTECTED]> wrote: > > > > > > > I saw one the other

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread David Giragosian
On 4/16/08, tedd <[EMAIL PROTECTED]> wrote: > > At 10:53 AM -0400 4/16/08, Andrew Ballard wrote: > > > On Wed, Apr 16, 2008 at 9:59 AM, tedd <[EMAIL PROTECTED]> wrote: > > > > > I saw one the other day that caught my eye -- will look into it. > > > > > > > > The first problem I see implementing t

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Daniel Brown
On Wed, Apr 16, 2008 at 11:42 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > Daniel Brown wrote: > > I guess it's a matter of preference - I tend to think that a shared > hosting user is best restricted to whatever changes he can do > in .htaccess (with php_admin_flag etc.). I allow overrides

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread tedd
At 10:53 AM -0400 4/16/08, Andrew Ballard wrote: On Wed, Apr 16, 2008 at 9:59 AM, tedd <[EMAIL PROTECTED]> wrote: > I saw one the other day that caught my eye -- will look into it. The first problem I see implementing the approach is the JavaScript sandbox. JavaScript is allowed to read the

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Per Jessen
Daniel Brown wrote: > On Wed, Apr 16, 2008 at 10:36 AM, Per Jessen <[EMAIL PROTECTED]> wrote: >> >> I'm curious - why? To me php.ini seems to be exactly the kind of >> thing you wouldn't the user to fiddle with - in a shared >> environment. > > To allow flexibility for the user, and give

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Daniel Brown
On Wed, Apr 16, 2008 at 10:36 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > > I'm curious - why? To me php.ini seems to be exactly the kind of thing > you wouldn't the user to fiddle with - in a shared environment. To allow flexibility for the user, and give them the opportunity to customize

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Andrew Ballard
On Wed, Apr 16, 2008 at 9:59 AM, tedd <[EMAIL PROTECTED]> wrote: > > At 9:41 AM -0400 4/16/08, Andrew Ballard wrote: > > > On Wed, Apr 16, 2008 at 7:56 AM, tedd <[EMAIL PROTECTED]> wrote: > > > > > At 6:48 PM +0900 4/16/08, Dave M G wrote: > > > > > > > PHP list, > > > > > > > > I have a PHP sc

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Per Jessen
Daniel Brown wrote: > On Wed, Apr 16, 2008 at 9:57 AM, Per Jessen <[EMAIL PROTECTED]> wrote: >> Daniel Brown wrote: >> > >> > And on a shared host, the likelihood of increased billing for >> > overuse of memory. >> >> Except a shared hoster would probably not permit anyone to change >> ph

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Daniel Brown
On Wed, Apr 16, 2008 at 9:57 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > Daniel Brown wrote: > > > > And on a shared host, the likelihood of increased billing for > > overuse of memory. > > Except a shared hoster would probably not permit anyone to change > php.ini :-) I do. A lot of

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread tedd
At 9:41 AM -0400 4/16/08, Andrew Ballard wrote: On Wed, Apr 16, 2008 at 7:56 AM, tedd <[EMAIL PROTECTED]> wrote: At 6:48 PM +0900 4/16/08, Dave M G wrote: > PHP list, > > I have a PHP script that resizes an image. It takes just about whatever size and shrinks and crops it down to 320X240.

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Per Jessen
Daniel Brown wrote: > On Wed, Apr 16, 2008 at 6:07 AM, Per Jessen <[EMAIL PROTECTED]> wrote: >> >> > Actually, I have no idea what the potential dangers are. >> >> Using up all available memory is the only real "risk". It might >> lead to swapping which in turn will most likely increase respon

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Daniel Brown
On Wed, Apr 16, 2008 at 7:56 AM, tedd <[EMAIL PROTECTED]> wrote: > At 6:48 PM +0900 4/16/08, Dave M G wrote: > > > PHP list, > > > > I have a PHP script that resizes an image. It takes just about whatever > size and shrinks and crops it down to 320X240. > > > > I've found that these days, it's not

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Daniel Brown
On Wed, Apr 16, 2008 at 6:07 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > > > Actually, I have no idea what the potential dangers are. > > Using up all available memory is the only real "risk". It might lead to > swapping which in turn will most likely increase response times. And on a shar

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Andrew Ballard
On Wed, Apr 16, 2008 at 7:56 AM, tedd <[EMAIL PROTECTED]> wrote: > At 6:48 PM +0900 4/16/08, Dave M G wrote: > > > PHP list, > > > > I have a PHP script that resizes an image. It takes just about whatever > size and shrinks and crops it down to 320X240. > > > > I've found that these days, it's not

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Daniel Brown
On Wed, Apr 16, 2008 at 5:48 AM, Dave M G <[EMAIL PROTECTED]> wrote: > PHP list, > > I have a PHP script that resizes an image. It takes just about whatever > size and shrinks and crops it down to 320X240. > [snip!] > > So sometimes I've seen an error in my logs that says: > > Fatal error: Allow

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread tedd
At 6:48 PM +0900 4/16/08, Dave M G wrote: PHP list, I have a PHP script that resizes an image. It takes just about whatever size and shrinks and crops it down to 320X240. I've found that these days, it's not uncommon for people to take images straight off their digital camera, which can be 3

Re: [PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Per Jessen
Dave M G wrote: > I contacted my web host provider, and they recommended increasing the > allowed allocation limit in "/etc/php.ini". > > Right now my allocation limit, assuming I'm looking at the right > setting is 8 megabytes: > > memory_limit = 8M ; Maximum amount of memory a script may

Re: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Ed W
Aschwin Wesselius wrote: Ed W wrote: RSS is staying approximately constant, ie the memory in use has not changed much VSZ, ie virtual memory has increased by more than 2x2=4. If someone has some hard experience of both platforms then please add some experience to this - however, I'm looking

Re: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Aschwin Wesselius
Ed W wrote: RSS is staying approximately constant, ie the memory in use has not changed much VSZ, ie virtual memory has increased by more than 2x2=4. If someone has some hard experience of both platforms then please add some experience to this - however, I'm looking for some hard debugging

Re: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Ed W
Aschwin Wesselius wrote: Ed W wrote: 45MB x2 is a lot less than 215MB... Also, I would expect the actual consumption to be less than 2x since not all the data will be doubled in size..? Any other suggestions on how to debug this 5x jump in memory usage? Thanks Ed W Robert Cummings wrote:

Re: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Aschwin Wesselius
Ed W wrote: 45MB x2 is a lot less than 215MB... Also, I would expect the actual consumption to be less than 2x since not all the data will be doubled in size..? Any other suggestions on how to debug this 5x jump in memory usage? Thanks Ed W Robert Cummings wrote: 64 bit integers are twic

Re: [PHP] Memory usage very high under AMD64?

2008-04-02 Thread Ed W
45MB x2 is a lot less than 215MB... Also, I would expect the actual consumption to be less than 2x since not all the data will be doubled in size..? Any other suggestions on how to debug this 5x jump in memory usage? Thanks Ed W Robert Cummings wrote: 64 bit integers are twice as big as 3

Re: [PHP] Memory usage very high under AMD64?

2008-04-02 Thread Robert Cummings
64 bit integers are twice as big as 32 bit integers. Cheers, Rob. On Wed, 2008-04-02 at 20:16 +0100, Ed W wrote: > Hi > > I am trying to figure out expected memory usage of PHP > > Under my 32bit install Apache 2 processes are drawing around 45MB > virtual and 25MB RSS. (XCache enabled) > > H

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

Re: [PHP] memory management

2007-03-26 Thread Jochem Maas
you hijacked someone else's thread. don't do that. you are making assuptions about references are correct - the engine is cleverer than you think (Sara Golemon has a nice blog post about this kind of reference assuption that you might want to look up) the word is 'because' not 'cos'. 'short rec

RE: [PHP] Memory Limit?

2007-01-19 Thread Jay Blanchard
[snip] I really don¹t know why I¹m getting the Fatal error. Do I need to do something else that I just don¹t know about? [/snip] Make sure your upload form and your php.ini reflect the new upper limit. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un

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] 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

Re: [PHP] Memory

2006-10-12 Thread Chris
Doug Fulton wrote: function padToNine($num) { Apart from the other suggestions I'd remove the padToNine function and use $padded_num = sprintf('%09d', $number); I think that returns the same ;) -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://w

Re: [PHP] Memory

2006-10-12 Thread Richard Lynch
On Thu, October 12, 2006 2:23 pm, Doug Fulton wrote: > I'm running out of memory even though I upped it to > "memory_limit = 500M" in php.ini. > Error messages and script are below. Thanks in advance for any tips. > > $ php -c /usr/local/php5/lib/php.ini createPseudoIDs.php > > crosswalk.txt > php

Re: [PHP] Memory

2006-10-12 Thread Jon Anderson
Maybe I'm doing my math wrong here, but for 1 to 9, make a string 9 bytes long, 10 including terminating null. (And PHP probably includes a little extra for overhead)... 9 * 10 bytes = 90 bytes -> that's about 9 and a half gigs... jon Doug Fulton wrote: I'm running out

Re: [PHP] memory leak - how to find it?

2006-08-03 Thread Richard Lynch
On Mon, July 31, 2006 6:23 am, Robin Getz wrote: > I am trying to debug a php script that I downloaded, which has a > memory > leak in it. > > I was looking for a way to find what variables were in php's memory, > and > what size, they were, but I couldn't find anything? > > The script is a off-lin

Re: [PHP] memory leak - how to find it?

2006-07-31 Thread chris smith
On 7/31/06, Robin Getz <[EMAIL PROTECTED]> wrote: I am trying to debug a php script that I downloaded, which has a memory leak in it. I was looking for a way to find what variables were in php's memory, and what size, they were, but I couldn't find anything? The script is a off-line wiki conver

Re: [PHP] memory leak - how to find it?

2006-07-31 Thread David Tulloh
Robin Getz wrote: > I am trying to debug a php script that I downloaded, which has a memory > leak in it. > > I was looking for a way to find what variables were in php's memory, and > what size, they were, but I couldn't find anything? > > The script is a off-line wiki conversion tool (walks thr

Re: [PHP] Memory and BLOB's

2006-03-13 Thread tedd
Jochem and tedd discussed: Isn't assigned memory just blocks of reserved addresses for the requesters use? It shouldn't make any difference where, or how much, a block of memory is. To move from a field in a record to another field is just following memory addresses from one field to another

Re: [PHP] Memory and BLOB's

2006-03-13 Thread Jochem Maas
tedd wrote: Jochem said: reorder the fields so that the VARCHARS are at the end of the table (and the BLOB field at the very, very end of the table). Why the importance of BLOB's being at the end of the table? its a guestimate based on something I read a while back, the reason was somethin

Re: [PHP] memory leak when referencing associative arrays

2006-02-14 Thread Gonzalo MC
Gonzalo MC escribió: Jochem Maas escribió: Gonzalo MC wrote: Hi Jochem, Thank you very much for your reply! no problem :-) Your reply lend me this morning to had a look again at the code, and I have solved more than half of the trouble caused by a leak on a PhpGtk function! :-) So

Re: [PHP] memory leak when referencing associative arrays

2006-02-14 Thread Gonzalo MC
Jochem Maas escribió: Gonzalo MC wrote: Hi Jochem, Thank you very much for your reply! no problem :-) Your reply lend me this morning to had a look again at the code, and I have solved more than half of the trouble caused by a leak on a PhpGtk function! :-) Sorry for the more long re

Re: [PHP] memory leak when referencing associative arrays

2006-02-14 Thread Jochem Maas
Gonzalo MC wrote: Hi Jochem, Thank you very much for your reply! no problem :-) Your reply lend me this morning to had a look again at the code, and I have solved more than half of the trouble caused by a leak on a PhpGtk function! :-) Sorry for the more long reply than it should be, but

Re: [PHP] memory leak when referencing associative arrays

2006-02-14 Thread Gonzalo MC
Hi Jochem, Thank you very much for your reply! Your reply lend me this morning to had a look again at the code, and I have solved more than half of the trouble caused by a leak on a PhpGtk function! :-) Sorry for the more long reply than it should be, but I hope you'll have the time to re

Re: [PHP] memory leak when referencing associative arrays

2006-02-14 Thread Gonzalo MC
Hi Jochem, Thank you very much for your reply! Your reply lend me this morning to had a look again at the code, and I have solved more than half of the trouble caused by a leak on a PhpGtk function! :-) Sorry for the more long reply than it should be, but I hope you'll have the time to re

Re: [PHP] memory leak when referencing associative arrays

2006-02-14 Thread Jochem Maas
Gonzalo MC wrote: Hi all, I'm having some pain with this process. I'll try to explain it well, my english is little bad... :-) ... Does the php garbage collector keep track of uncollectable objects / zvals as python gc does? It is some way to freed some memory I know it should be really

Re: [PHP] Memory Leak?

2005-10-23 Thread cron
I think the php GC only kicks in at the end of a script some calls to mysql_free_result might help Angelo - Original Message - From: "Richard Lynch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Saturday, October 22, 2005 11:40 PM Subject: Re: [PHP]

Re: [PHP] Memory Leak?

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 9:24 pm, [EMAIL PROTECTED] wrote: > Sucks that you don't have more control over the incoming data. Just for the record, for when the source of this data reads this thread. I am ECSTATIC to have this data, period. :-) I know we'll work out a viable solution in time, even

Re: [PHP] Memory Leak?

2005-10-22 Thread tg-php
One other thing to keep in mind. Connecting to a database and disconnecting takes some amount of time. If you do it in batches of 10, 100, whatever then make sure you only connect and disconnect once or else you won't have any time savings at all (and will burden the server unnecessarily). Su

Re: [PHP] Memory Leak?

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 5:04 pm, [EMAIL PROTECTED] wrote: > Does it make a difference if instead of one record at a time, you pull > 10, 20, 100... might speed up your process a little and if it > doesn't use any more memory, then why not? I could make a buffer of N lines and read them, I guess

Re: [PHP] Memory Leak?

2005-10-22 Thread Jasper Bryant-Greene
On Sat, 2005-10-22 at 16:36 -0500, Richard Lynch wrote: > I've written a script to munge and import 108,000+ records. [snip] > http://l-i-e.com/feedbaby/memory_leak.htm It looks fine to me, but you might like to try accumulating the records say up to 100 at a time and then doing extended INSERTs (

Re: [PHP] Memory Leak?

2005-10-22 Thread Robert Cummings
On Sat, 2005-10-22 at 17:36, Richard Lynch wrote: > I've written a script to munge and import 108,000+ records. > > To avoid spiking the server, I'm sleep()ing 1 second for each record. > > So it takes 30+ hours to run, so what? > > This data changes "daily" but not really much more often than t

Re: [PHP] Memory Leak?

2005-10-22 Thread tg-php
Because of the way it spikes and maintains, I'm guess that this is normal behavior, but we'll see what the real experts have to say. In theory, if you allow a process 100MB of memory and it thinks it might need some stuff again later, it's likely to cache for faster reuse of that data later. B

Re: [PHP] Memory use

2005-03-28 Thread Richard Lynch
http://php.net/manual/en/function.memory-get-usage.php Do it before and after, and subtract. YMMV. On Wed, March 23, 2005 10:31 pm, Joe Wollard said: > Greetings, > > I'm trying to help a C programmer understand and use PHP for web > development. So far all the similarities between C++ and PHP

Re: [PHP] Memory exhausted message wrong

2005-03-20 Thread LacaK
Only try -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Memory exhausted message wrong

2005-03-18 Thread Andrew Hill
> > Andrew Hill wrote: > > > The problem is that in my php.ini file, I have the line: > > > > > > memory_limit = 8M > > > > > > So, why is PHP reporting that the allowed memory size is 256M? > > > The phpinfo() function correctly reports that memory_limit is > > > set to 8M. I've just been infor

RE: [PHP] Memory exhausted message wrong

2005-03-18 Thread Andrew Hill
Marek Kilimajer wrote: > Andrew Hill wrote: > > The problem is that in my php.ini file, I have the line: > > > > memory_limit = 8M > > > > So, why is PHP reporting that the allowed memory size is 256M? > > The phpinfo() function correctly reports that memory_limit is > > set to 8M. > > Are you r

Re: [PHP] Memory exhausted message wrong

2005-03-18 Thread Marek Kilimajer
Andrew Hill wrote: Hi all, I'm trying to run phpDocumentor 1.3.0RC3 under PHP 4.3.10, and I get the following error: Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 3668 bytes) in /usr/local/lib/php/PhpDocumentor/phpDocumentor/phpDocumentorTWordParser. inc on line 2

Re: [PHP] memory error

2005-02-17 Thread Richard Lynch
Bruno Santos wrote: > Hello. I've developed a script to use in shell to resize several images, > but, when i try to run it, i keep receiving this error: > > Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to > allocate 2048 bytes) > > how can i solve it ? If you actually NEED mo

Re: [PHP] memory error

2005-02-17 Thread Marek Kilimajer
Bruno Santos wrote: Hello. I've developed a script to use in shell to resize several images, but, when i try to run it, i keep receiving this error: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 2048 bytes) how can i solve it ? PHP: 5.0.3 php.ini settings: max_e

Re: [PHP] Memory usage

2004-05-12 Thread Curt Zirzow
* Thus wrote Oliver Hankeln ([EMAIL PROTECTED]): > Hi! > > I get memory exceded errors and want to find out why. So I am looking > for a way to determine how much memory is currently beeing used by my > script. Is this possible? > getPID + reading from /proc dosent work because php is an apache

Re: [PHP] Memory Size Help Please

2003-11-19 Thread Nick Wilson
* and then Raditha Dissanayake declared > Hi, > > Jay's comment was a fair one. It's not always possible to help without > full info. I beg to differ, the point was valid but the manner unfriendly at best. > You could try writing your data directly to disk instead of keeping them > in me

Re: [PHP] Memory Size Help Please

2003-11-19 Thread Raditha Dissanayake
Hi, Jay's comment was a fair one. It's not always possible to help without full info. You could try writing your data directly to disk instead of keeping them in memory as your code seems to be doing. In that case your regex function might need to go into the character data handler. Nick Wils

Re: [PHP] Memory Size Help Please

2003-11-19 Thread Nick Wilson
* and then Jay Blanchard declared > Nope, not enough info to spot the problem. I could point you in a Spare me the sarcasm. Here's the code if anyone can help, thanks. http://www.weblogs.com/changes.xml'); $xml=implode("\n", $xml); // Pattern match string $urlpattern = '/((http|https|ftp):

Re: [PHP] Memory Size Help Please

2003-11-19 Thread Raditha Dissanayake
hi How about using fopen() and reading line by line. And for xml parsing if you are using DOM switch to SAX that will always help. Nick Wilson wrote: Hi all, Can anyone spot the problem here and point me in the right direction? I have a script that goes and fetches the xml at weblogs.com (ht

RE: [PHP] Memory Size Help Please

2003-11-19 Thread Jay Blanchard
[snip] Can anyone spot the problem here and point me in the right direction? [/snip] Nope, not enough info to spot the problem. I could point you in a direction, but that wouldn't help I am afraid. Wait, hold that thought, I have a direction to point you in. Please provide us with relevant detail,

  1   2   >