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] debugging PHP memory corruption

2012-01-05 Thread Andrew Morum
>Hi Andy, >Have you tried running it with valgrind? (See [1] for tips). >Otherwise, you might have more luck at php-internals mailing list, >since it is related to PHP development if you intend to fix either PHP >or the plugin. > >Matijn >[1] https://bugs.php.net/bugs-getting-valgrind-log.php Than

Re: [PHP] debugging PHP memory corruption

2012-01-04 Thread Matijn Woudt
On Wed, Jan 4, 2012 at 3:34 PM, Andrew Morum wrote: > We've got a problem with PHP 5.3.8 and a third party (open source) > library (WSo2 SOAP). > > > > At some point during the request to the PHP script, some structures seem > to be getting corrupted causing PHP to crash. > > > > Depending on the

[PHP] debugging PHP memory corruption

2012-01-04 Thread Andrew Morum
We've got a problem with PHP 5.3.8 and a third party (open source) library (WSo2 SOAP). At some point during the request to the PHP script, some structures seem to be getting corrupted causing PHP to crash. Depending on the code in the PHP script, it's either crashing during in a print_r/var_

[PHP] memory overflow :/

2011-08-04 Thread Tontonq Tontonq
hi i can't see anything wrong that will cause memory problem but parsing 1gb memory limit doesn't come enough for just parsing a 50 kb file but when i try to parse another file that is 24 kb 24 mb becomes enough memory here is the script http://pastebin.com/H9mG7ucU if you go to rss.php?id=17

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

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

[PHP] Memory limit Problem

2011-06-23 Thread Graham Drabble
Hi, I've got a problem with setting the memory limit in php.ini. I have memory_limit = 1024M ; set in php.ini Checking with phpinfo says I have memory_limit 1024M 1024M However when uploading a large file I get Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to all

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

[PHP] memory usage/release & GC

2010-12-30 Thread Tommy Pham
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 password in length with full use of the keys (94 characters), i

[PHP] Memory investigation

2010-03-02 Thread Larry Garfield
Hi folks. I have a complicated PHP app that is eating up more memory than I think it should. I have a couple of theories as to where it could be going, but I need some way to verify it. There are a number of large data structures (mostly arrays) that get built up throughout the course of the

Re: [PHP] Re: how do I use php://memory?

2010-01-30 Thread Daniel Brown
On Sat, Jan 30, 2010 at 12:18, Shawn McKenzie wrote: > > Done.  Thanks Dan.  http://bugs.php.net/bug.php?id=50886 Thank you, sir. I thanked you on Facebook when I saw the report come in, but wanted to thank you properly here as well. -- daniel.br...@parasane.net || danbr...@php.net http:/

Re: [PHP] Re: how do I use php://memory?

2010-01-30 Thread Shawn McKenzie
Daniel P. Brown wrote: > (Typing from the DROID, so forgive the top-posting.) > > Shawn, would you take a few moments to submit this as a bug at > http://bugs.php.net/? I know you well enough that, if you say the docs suck, > they probably do. > > On Jan 29, 2010 10:47 PM, "Shawn McKenzie" wrote

Re: [PHP] how do I use php://memory?

2010-01-29 Thread Mari Masuda
On Jan 29, 2010, at 10:57 PM, Mari Masuda wrote: > > On Jan 29, 2010, at 4:38 PM, Nathan Nobbe wrote: > >> On Fri, Jan 29, 2010 at 5:35 PM, Mari Masuda >> wrote: >> Hello, >> >> I have a function that uses tidy to attempt to clean up a bunch of crappy >> HTML that I inherited. In order to

Re: [PHP] how do I use php://memory?

2010-01-29 Thread Mari Masuda
On Jan 29, 2010, at 4:38 PM, Nathan Nobbe wrote: > On Fri, Jan 29, 2010 at 5:35 PM, Mari Masuda wrote: > Hello, > > I have a function that uses tidy to attempt to clean up a bunch of crappy > HTML that I inherited. In order to use tidy, I write the crappy HTML to a > temporary file on disk,

Re: [PHP] Re: how do I use php://memory?

2010-01-29 Thread Daniel P. Brown
(Typing from the DROID, so forgive the top-posting.) Shawn, would you take a few moments to submit this as a bug at http://bugs.php.net/? I know you well enough that, if you say the docs suck, they probably do. On Jan 29, 2010 10:47 PM, "Shawn McKenzie" wrote: Eric Lee wrote: > On Sat, Jan 30,

Re: [PHP] Re: how do I use php://memory?

2010-01-29 Thread Shawn McKenzie
Eric Lee wrote: > On Sat, Jan 30, 2010 at 9:00 AM, Shawn McKenzie wrote: > >> Mari Masuda wrote: >> >>> Has anyone ever successfully used php://memory before? If so, what >>> can I do to use it in my code? Thank you. >> No, but I was intrigued to try

Re: [PHP] Re: how do I use php://memory?

2010-01-29 Thread Eric Lee
On Sat, Jan 30, 2010 at 9:00 AM, Shawn McKenzie wrote: > Mari Masuda wrote: > > > Has anyone ever successfully used php://memory before? If so, what > > can I do to use it in my code? Thank you. > > No, but I was intrigued to try it, so I tested this

[PHP] Re: how do I use php://memory?

2010-01-29 Thread Shawn McKenzie
Mari Masuda wrote: > Has anyone ever successfully used php://memory before? If so, what > can I do to use it in my code? Thank you. No, but I was intrigued to try it, so I tested this: $text = 'Some text.'; file_put_contents('php://memory', $text); echo file_get_cont

Re: [PHP] how do I use php://memory?

2010-01-29 Thread Jochem Maas
) HTML. > The program itself works fine but with all of the disk access, it runs quite > slowly. I saw on this page (http://www.php.net/manual/en/wrappers.php.php) > that I could write to memory by using php://memory. Unfortunately, I could > not quite get it to work. The problem is

Re: [PHP] how do I use php://memory?

2010-01-29 Thread Nathan Nobbe
On Fri, Jan 29, 2010 at 5:35 PM, Mari Masuda wrote: > Hello, > > I have a function that uses tidy to attempt to clean up a bunch of crappy > HTML that I inherited. In order to use tidy, I write the crappy HTML to a > temporary file on disk, run tidy, and extract and return the clean(er) HTML. >

[PHP] how do I use php://memory?

2010-01-29 Thread Mari Masuda
access, it runs quite slowly. I saw on this page (http://www.php.net/manual/en/wrappers.php.php) that I could write to memory by using php://memory. Unfortunately, I could not quite get it to work. The problem is that in the below function, the code within the [[[if (file_exists($dirty_file_path

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

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

2010-01-23 Thread D. Dante Lorenso
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 array is not very memory efficient and my millions of records are co

Re: [PHP] PHP Memory Management

2008-08-04 Thread Waynn Lue
> > Waynn Lue wrote: > >> I've been running the script below: >> >> > $appIds = getLotsOfAppIds(); >> foreach ($appIds as $appId) { >>echo "$appId\n"; >>//echo memory_get_usage() . "\n"; >>try { >> $getBundles = getBundles($appId); >> $numBundles = count($registeredBundles);

Re: [PHP] PHP Memory Management

2008-08-03 Thread Chacha C
is it possible because you can assign $func = foo and call $func() and it will call foo(), maybe that its creating an endless loop of assigning the function to itself? On Sun, Aug 3, 2008 at 11:17 AM, brian <[EMAIL PROTECTED]> wrote: > Waynn Lue wrote: > >> I've been running the script below: >>

Re: [PHP] PHP Memory Management

2008-08-03 Thread brian
Waynn Lue wrote: I've been running the script below: And I get PHP Fatal Error: Allowed Memory Size Exhausted after it runs for a bit. Looking at the memory usage, it's because $getBundles (an array) is huge, and keeps growing. What I'm confused by is why setting it to something else in the

[PHP] PHP Memory Management

2008-08-02 Thread Waynn Lue
I've been running the script below: And I get PHP Fatal Error: Allowed Memory Size Exhausted after it runs for a bit. Looking at the memory usage, it's because $getBundles (an array) is huge, and keeps growing. What I'm confused by is why setting it to something else in the next iteration of t

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)

[PHP] Memory profiling tools

2008-06-23 Thread Larry Garfield
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) tools that people can recommend f

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

[PHP] Memory cache problem

2008-06-13 Thread R B
Hello, 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 script works fine, because don´t appear

RE: [PHP] Command-line PHP memory limit

2008-06-12 Thread Boyd, Todd M.
> -Original Message- > From: Shawn McKenzie [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 12, 2008 11:06 AM > To: php-general@lists.php.net > Subject: Re: [PHP] Command-line PHP memory limit > > Per Jessen wrote: > > Rene Fournier wrote: > > > >

Re: [PHP] Command-line PHP memory limit

2008-06-12 Thread Shawn McKenzie
Per Jessen wrote: Rene Fournier wrote: Is it possible to set a unique memory limit for PHP scripts that are run from the command line? (That is, different from what's specified in php.ini.) This might specific to openSUSE, but the typical installation comes with separate php.inis for apache a

Re: [PHP] Command-line PHP memory limit

2008-06-11 Thread Per Jessen
Rene Fournier wrote: > Is it possible to set a unique memory limit for PHP scripts that are > run from the command line? (That is, different from what's specified > in php.ini.) This might specific to openSUSE, but the typical installation comes with separate php.inis for apache and cli. /etc/p

Re: [PHP] Command-line PHP memory limit

2008-06-11 Thread Robert Cummings
On Wed, 2008-06-11 at 23:48 +0200, Rene Fournier wrote: > Is it possible to set a unique memory limit for PHP scripts that are > run from the command line? (That is, different from what's specified > in php.ini.) In your script: ini_set( 'memory_limit', -1 ); Cheers, Rob. -- http://www.

[PHP] Command-line PHP memory limit

2008-06-11 Thread Rene Fournier
Is it possible to set a unique memory limit for PHP scripts that are run from the command line? (That is, different from what's specified in php.ini.) ...Rene

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

[PHP] Memory limit of 8 MB not enough

2008-04-16 Thread Dave M G
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 3000X2000 pixels in image size, even if the

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

2008-04-03 Thread Thiago Pojda
: Re: [PHP] Memory usage very high under AMD64? 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

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

[PHP] Memory usage very high under AMD64?

2008-04-02 Thread Ed W
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) However, under 64bit, same PHP and Apache versions, FastCGI is consuming around 110MB virt and 25MB RSS. However, Apache2 processes

[PHP] Memory Leaks

2008-03-22 Thread Nilesh Govindrajan
I am having 2 memory leaks while calling phpinfo() via FastCGI (lighttpd) when session.auto_start is 1. Otherwise there is no memory leak. Here are the two memory leaks - [Sat Mar 22 14:07:49 2008] Script: '/var/www/lighttpd/test.php' /root/php-5.2.5/ext/standard/url_scanner_ex.c(305) : Free

Re: [PHP] PHP Memory Leak

2007-12-07 Thread Jim Lucas
Sascha Braun wrote: Hi Everybody, I have a couple of foreach loops which are ending in a for loop, which causes the apache to consume the complete memory of the server system the php engine is running on. The nesting level is at round about three and looking like that: $num_new = 4; if (is_arr

Re: [PHP] PHP Memory Leak

2007-12-06 Thread Casey
On Dec 6, 2007, at 3:15 PM, Sascha Braun <[EMAIL PROTECTED]> wrote: Hi Everybody, I have a couple of foreach loops which are ending in a for loop, which causes the apache to consume the complete memory of the server system the php engine is running on. The nesting level is at round abou

Re: [PHP] PHP Memory Leak

2007-12-06 Thread Chris
Sascha Braun wrote: Hi Everybody, I have a couple of foreach loops which are ending in a for loop, which causes the apache to consume the complete memory of the server system the php engine is running on. The nesting level is at round about three and looking like that: $num_new = 4; if (is_arr

[PHP] PHP Memory Leak

2007-12-06 Thread Sascha Braun
Hi Everybody, I have a couple of foreach loops which are ending in a for loop, which causes the apache to consume the complete memory of the server system the php engine is running on. The nesting level is at round about three and looking like that: $num_new = 4; if (is_array($array)) {

  1   2   3   >