2012-06-12 34 views
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 
+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打開標記<?php之前,您可能會在呼叫某個內容或留下一些空白後調用header();

最後,Warning: mysql_query() [function.mysql-query]: Unable to save result set錯誤通常是一個MySQL問題。但是,由於知道自己內存不足,可能會先解決其他錯誤。

+0

Thx但我可以在那裏改變? –

+0

我已經給你提出了關於內存不足錯誤的建議。對於另一個錯誤,你應該在其他地方替換'header();'函數,或者在標頭調用之前不要回顯內容 –

0

php.ini或苗條你的代碼增加memory_limit

+0

我無法訪問到php.ini。我的服務器是共享的,我該怎麼辦? –

+0

嘗試通過'.htaccess'設置它 - 你有權訪問它嗎?如果沒有,那麼你運氣不好:服務器不允許你使用這麼多的內存。 –

+0

我沒有acces太! –