PHP-Error: Allowed memory size of...

Apache, Lighttpd, nginx, Cherokee
Post Reply
sllnd
Posts: 177
Joined: 2002-10-14 22:33
 

PHP-Error: Allowed memory size of...

Post by sllnd »

Hallo zusammen,

ich habe da mal ein kleines Problem.

Ab und zu erscheint dieser Fehler mal, mal wieder auch nicht.

fatal error: Allowed memory size of 2621440 bytes exhausted (tried to allocate 11460 bytes) in #pfad# line #line#

Bei dieser Datei wird lediglich Daten aus der MySQL Datenbank geholt und in HTML Seiten geschrieben. Auf dem alten Server hat dies wunderbar geklappt nur auf dem neuen nicht. PHP und MySQL ist mit der selben Konfig versehen.


Das komische an der Sache ist ja, dass weniger Bytes gebraucht werden, als PHP überhaupt zulässt (andersherum würde ich das ja noch verstehen). Dieses Problem ist anscheinend kein Einzelfall jedoch in fast allen Foren zu keinem Ergebnis gekommen.

php-eistellung:
memory_limit 25M


rechner:
suse 9.2 32bit
p4 - 2,4 ghz
512 mb ram
apache 2.0.54
php 4.3.11

Gruß & Danke
SllnD
stefanpropehan
Posts: 335
Joined: 2002-12-17 22:25
Location: Berlin
 

Re: PHP-Error: Allowed memory size of...

Post by stefanpropehan »

Evtl. einen PHP Accelerator im Einsatz?

--
Stefan
sllnd
Posts: 177
Joined: 2002-10-14 22:33
 

Re: PHP-Error: Allowed memory size of...

Post by sllnd »

Nein. Es wurde lediglich die aktuellen RPMs vom SUSE Server installiert.
Matthias Diehl
Posts: 315
Joined: 2002-09-24 13:26
 

Re: PHP-Error: Allowed memory size of...

Post by Matthias Diehl »

Dann erhöhe doch bitte mal die Memory-Einstellung in der php.ini. Das wird Dein Problem beheben, auch wenn man denken könnte, es wäre ja genung reserviert.
projekt2501
Posts: 92
Joined: 2003-08-14 08:23
Contact:
 

Re: PHP-Error: Allowed memory size of...

Post by projekt2501 »

Hi,

du hast oben eine Angabe in Byte gemacht, die ca. 2,5 MB nicht 25 MB entspricht... prüf mal :)
r00ty
Posts: 747
Joined: 2003-03-17 15:32
 

Re: PHP-Error: Allowed memory size of...

Post by r00ty »

was sagt denn dein
php_info() ?
sllnd
Posts: 177
Joined: 2002-10-14 22:33
 

Re: PHP-Error: Allowed memory size of...

Post by sllnd »

Hab jetzt memory_limit auf 35M gesetzt und nun erscheint der Fehler nicht mehr.
outofbound
Posts: 470
Joined: 2002-05-14 13:02
Location: Karlsruhe City
 

Re: PHP-Error: Allowed memory size of...

Post by outofbound »

SllnD wrote:
fatal error: Allowed memory size of 2621440 bytes exhausted (tried to allocate 11460 bytes) in #pfad# line #line#

Das komische an der Sache ist ja, dass weniger Bytes gebraucht werden, als PHP überhaupt zulässt (andersherum würde ich das ja noch verstehen).
Da steht, dass er versucht hat, 11460 Bytes zu allocaten, und dadurch die Grenze überschritten wurde. (Also von den 2621440 Bytes *Insgesamt* waren weniger als 11460 verfügbar). Deswegen ist das ganz normal.

Nur zur Info. ;)

Gruss,

Out
Post Reply