我网站中的错误列表

时间:2012-06-12 10:19:20

标签: sql database vbulletin

我不知道为什么我的网站会给我这个错误。这是错误列表。 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 

2 个答案:

答案 0 :(得分: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警告。在使用PHP开放标记header();之前,在回显某些内容或有一些空格后,您可能会进行<?php调用。

最后,Warning: mysql_query() [function.mysql-query]: Unable to save result set错误通常是MySQL问题。但是知道你的内存不足,你可能会先解决其他错误。

答案 1 :(得分:0)

memory_limit增加php.ini或缩小代码。