2012-01-30 18 views
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

哈维尔

+0

如果你需要处理的数据数量较大,你可以改变你的PHP配置的最大执行时间参数。但有这个问题是用坏的设计的后果 – 2012-01-31 18:18:03

+0

我有一个包含750,000非平凡记录的表的管理模块,并从未遇到过这种问题。它适用于我的Mac和我们的生产型Linux服务器(都使用MySQL)。所以你的数据库设计可能有问题,也可能是你正在使用的错误表格查询。您是否尝试为该模块的查询指定和创建自定义table_method? – ybull 2012-01-31 19:00:02

回答

1

我有同样的问题。我解决了:

filter: 
    class: false 

在generator.yml中。

我在选择形式的太多的选择在我的过滤器

相关问题