0

私のサイトでこのエラーが発生する理由がわかりません。これはエラーのリストです。plzふた私!何をすればよいでしょうか ?

Fatal error: Out of memory (allocated 6029312) (tried to allocate 8192 bytes) in /home/lifegat/domains/life-gate.ir/public_html/includes/functions.php on line 7216


Fatal error: Out of memory (allocated 7602176) (tried to allocate 1245184 bytes) in /home/lifegat/domains/life-gate.ir/public_html/misc.php(89) : eval()'d code on line 1534


Fatal error: Out of memory (allocated 786432) (tried to allocate 1245184 bytes) in /home/lifegat/domains/life-gate.ir/public_html/showthread.php on line 1789



Fatal error: Out of memory (allocated 7340032) (tried to allocate 30201 bytes) in /home/lifegat/domains/life-gate.ir/public_html/includes/class_core.php(4633) : eval()'d code on line 627



Fatal error: Out of memory (allocated 2097152) (tried to allocate 77824 bytes) in /home/lifegat/domains/life-gate.ir/public_html/includes/functions.php on line 2550





Warning: mysql_query() [function.mysql-query]: Unable to save result set in [path]/includes/class_core.php on line 417

Warning: Cannot modify header information - headers already sent by (output started at [path]/includes/class_core.php:5615) in [path]/includes/functions.php on line 4513

データベースエラー

Fatal error: Out of memory (allocated 786432) (tried to allocate 311296 bytes) in /home/lifegat/domains/life-gate.ir/public_html/includes/init.php on line 552

Fatal error: Out of memory (allocated 3145728) (tried to allocate 19456 bytes) in /home/lifegat/domains/life-gate.ir/public_html/includes/functions.php on line 8989




Fatal error: Out of memory (allocated 262144) (tried to allocate 311296 bytes) in /home/lifegat/domains/life-gate.ir/public_html/forum.php on line 475



Warning: mysql_query() [function.mysql-query]: Unable to save result set in [path]/includes/class_core.php on line 417

Warning: Cannot modify header information - headers already sent by (output started at [path]/includes/class_core.php:5615) in [path]/includes/functions.php on line 4513 
4

2 に答える 2

1

Fatal error: Out of memoryサーバーの予約済みメモリが不足していることを意味します。これは通常、画像などの大きなオブジェクトを操作しているときに発生します。

&解決策は、演算子を使用することです。これにより、別のオブジェクトに向けて可変ポイントが作成されます。例:

$object = new BigObject();
$copy = $object;              // this copies the object thus more memory is required
$pointer = &$object;          // the & makes the $pointer variable point to $object

変数は別の変数を指しているため、一方を変更すると、もう一方も変更されます。

$object = new BigObject();
$pointer = &$object;

$object->x = 12345;

echo $object->x;
echo $pointer->x; // will have the same output as $object->x

ポインタは、次のような関数でよく使用されます。

$object = new BigObject();
x( $object );


function x( &$object ) {
     // do stuff with $object
}

警告は通常、Warning: Cannot modify header information出力の送信後にヘッダーデータを変更しようとしたときに表示されます。header();PHPのopenタグを使用する前に、何かをエコーし​​た後、または空白を入れた後で、おそらく呼び出しがあります<?php

最後に、Warning: mysql_query() [function.mysql-query]: Unable to save result setエラーは通常MySQLの問題です。ただし、メモリが不足していることを知っている場合は、最初に他のエラーを修正することができます。

于 2012-06-12T10:26:20.853 に答える
0

memory_limitコードを増やすphp.iniかスリムにします。

于 2012-06-12T10:23:30.467 に答える