0
當我嘗試顯示管理員 模塊的列表時(如您所看到的,我發送了兩個請求:第一個在18:45,第二個在18:48, 秒),我收到以下錯誤消息。該模型在表格中有9500行。symfony:關於一個管理模塊。桌子的大小可能很重要?
[Mon Jan 30 18:45:07 2012] [error] [client 127.0.0.1] PHP Fatal
error: Maximum execution time of 30 seconds exceeded in /home/javier/
eclipse-php/workspace/prueba/lib/vendor/symfony/lib/plugins/
sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Collection.php on line
473
[Mon Jan 30 18:45:07 2012] [error] [client 127.0.0.1] PHP Fatal
error: Call to a member function shutdown() on a non-object in /home/
javier/eclipse-php/workspace/prueba/lib/vendor/symfony/lib/util/
sfContext.class.php on line 594
[Mon Jan 30 18:45:08 2012] [notice] child pid 1340 exit signal
Segmentation fault (11)
[Mon Jan 30 18:48:02 2012] [error] [client 127.0.0.1] File does not
exist: /home/javier/eclipse-php/workspace/prueba/web/favicon.ico
[Mon Jan 30 18:48:34 2012] [error] [client 127.0.0.1] PHP Fatal
error: Maximum execution time of 30 seconds exceeded in /home/javier/
eclipse-php/workspace/prueba/lib/vendor/symfony/lib/plugins/
sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Collection.php on line
473
[Mon Jan 30 18:48:35 2012] [notice] child pid 1339 exit signal
Segmentation fault (11)
我沒有與基於其他 車型有少rows..So我應該怎麼辦其他管理模塊的任何問題?在/etc/php5/apache2/php.ini 我將內存限制設置爲4096MB(memory_limit = 4096M)。
一條線索:這正是是寫在Collection.php的473線:
/**
* for some weird reason in_array cannot be used here (php
bug ?)
*
* if used it results in fatal error : [ nesting level too
deep ]
*/
foreach ($this->data as $val) { // line 473
if ($val === $record) {
return false;
}
}
,這是什麼是寫在行594 sfContext.class.php:
/**
* Execute the shutdown procedure.
*
* @return void
*/
public function shutdown()
{
// shutdown all factories
if($this->has('user'))
{
$this->getUser()->shutdown(); //line 594
$this->getStorage()->shutdown();
}
有什麼幫助嗎?
SF 1.4
哈維爾
如果你需要處理的數據數量較大,你可以改變你的PHP配置的最大執行時間參數。但有這個問題是用壞的設計的後果 – 2012-01-31 18:18:03
我有一個包含750,000非平凡記錄的表的管理模塊,並從未遇到過這種問題。它適用於我的Mac和我們的生產型Linux服務器(都使用MySQL)。所以你的數據庫設計可能有問題,也可能是你正在使用的錯誤表格查詢。您是否嘗試爲該模塊的查詢指定和創建自定義table_method? – ybull 2012-01-31 19:00:02