2013-08-22 24 views
0

我不知道爲什麼這是突然發生的。嘗試添加到購物車時,我僅在某些瀏覽器中出現錯誤。該錯誤顯示「無法將商品添加到購物車」。無法將商品添加到購物車 - Magento Safari Mac - 爲什麼?

它只發生在Safari和較舊的瀏覽器上。我真的可以用一些幫助。以下是錯誤日誌,如果有幫助:

PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 30720 bytes) in /home/sitenamepublic_html/lib/Zend/Locale/Format.php on line 1150 

PHP Warning: ini_set() has been disabled for security reasons in /home/sitename/public_html/get.php on line 40 

PHP Warning: ini_set() has been disabled for security reasons in /home/sitename/public_html/get.php on line 40 

PHP Fatal error: Call to a member function load() on a non-object in /home/sitename/public_html/app/design/frontend/default/carlton/template/catalog/product/test.phtml on line 68 

任何幫助將不勝感激!

+0

你有沒有嘗試過通過php.ini增加內存限制? –

回答

1

那裏有很多錯誤。

這一次將暫停執行PHP

PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 30720 bytes) in /home/sitenamepublic_html/lib/Zend/Locale/Format.php on line 1150 

如將這一

PHP Fatal error: Call to a member function load() on a non-object in /home/sitename/public_html/app/design/frontend/default/carlton/template/catalog/product/test.phtml on line 68 

和警告

PHP Warning: ini_set() has been disabled for security reasons in /home/sitename/public_html/get.php on line 40 
PHP Warning: ini_set() has been disabled for security reasons in /home/sitename/public_html/get.php on line 40 

都爲get.php頁明確發生。

回覆:get.php警告,這聽起來像你有alternative media storage功能開啓,而你的註釋去掉,在該文件中ini_set函數調用display_errors。您的虛擬主機不允許你這樣做,你的生產服務器上,因此重新註釋該行

//File: get.php 
#ini_set('display_errors', 1); 

回覆:Call to a member function load(),好像你在

app/design/frontend/default/carlton/template/catalog/product/test.phtml 

有一些自定義代碼,是無效。由於這不是標準Magento發行版的一部分,因此您不可能在此找到針對此問題的解決方案。在該文件中查找對load的調用,並找出爲什麼它所調用的變量沒有對象。

最後,Safari很可能是紅色聽力。以下錯誤

PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 30720 bytes) in /home/sitenamepublic_html/lib/Zend/Locale/Format.php on line 1150 

指示PHP正在運行以抵禦其內存限制。這將隨機發生,取決於請求的頁面,裝入的是什麼狀態等。67108864字節是64MB。 Magento建議您的PHP內存限制設置爲256MB,其中512MB更爲常見。您需要讓您的虛擬主機更改PHP memory_limit設置。他們不會想這樣做。

這一切都表明您的虛擬主機不適合運行Magento。我建議Nexcess爲起始Magento託管需求(雖然我懷疑,作爲他們的會員計劃的成員)。 Magento Speed Test是一個很好的地方,看看各種網絡主機如何處理Magento。

+0

我不知道我可以在哪裏更改「#ini_set('display_errors',1);」你能指導我走向正確的方向嗎,非常感謝! – gcupat

相關問題