symfony:关于管理模块。桌子的大小可能很重要吗?

时间:2012-01-30 18:02:55

标签: symfony1

当我尝试显示管理员列表时,我收到以下错误 模块(你可以看到我发送了两个请求:第一个是在18:45和 第二次在18:48)。该模型在表中有9500行。

[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) 

我对基于其他的管理模块没有任何问题 行数较少的模型。那我该怎么办?在/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; 
            } 
        } 

这是sfContext.class.php中第594行写的:

  /** 
   * 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

哈维尔

1 个答案:

答案 0 :(得分:1)

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

filter:
   class: false

在generator.yml。

我的过滤器中的选择表单中有太多选项