Afficher un message
Vieux 12/09/2007, 18h04   #2
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Allowed memory size of 16777216 bytes exhausted

On Wed, 12 Sep 2007 17:57:57 +0200, Jim Carlock <anonymous@127.0.0.1>
wrote:

> I'm filling a really large array. Is there a way to get by
> this error message without editing the php.ini? The array
> needs to get built once, then looped through to fill a data-
> base, and it will get alot bigger than 1.5MB, I'm going to
> guess maybe at least 100MB.
>
> <snip>
>
> [12-Sep-2007 11:41:53] PHP Fatal error: Allowed memory size
> of 16777216 bytes exhausted (tried to allocate 10 bytes) in...
> ... on line 23687
>
> </snip>


http://www.php.net/manual/en/ini.cor...i.memory-limit

So, normally this would be perfectly changable in the script itself, in a
..htaccess or httpd.conf (for Apache), etc.

> The other thing I was thinking of involves using a function
> that gets supplied an index and returns only 20 or 50 items
> at a time.


I'd look into possible solutions not even building your array, but a
straight insert (or update!) into the database. It depends on the actual
code/purpose though.

--
Rik Wasmus
  Réponse avec citation
 
Page generated in 0,04678 seconds with 9 queries