私はいくつかの科学データを管理するアプリケーションを持つYiiを実行しています。内部サーバーエラー500、メモリ不足エラーYii
私はCentOS上でApacheを実行しています。
PHPバージョン5.2.10 のApache/2.2.3(CentOSの)
ここで(個人識別情報を難読化)私のエラーログがあります。
[Wed Apr 18 15:27:42 2012] [error] [client 000.000.000.000] PHP Notice: Use of undefined constant \x94512M\x93 - assumed '\x94512M\x93' in /var/www/MySite/www/admin/index.php on line 12, referer: http://MySite.com/admin/index.php?r=factsheet/admin
[Wed Apr 18 15:27:44 2012] [error] [client 000.000.000.000] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 57 bytes) in /var/www/MySite/www/yii/framework/db/ar/CActiveRecord.php on line 1856, referer: http://MySite.com/admin/index.php?r=factsheet/admin
私は私の見解のうちれるrenderPartialを()を削除した場合、私はロードするページを取得することができますので、それは何とかそれに縛られています表示されます。
CActiveRecord.php:
protected function instantiate($attributes)
{
$class=get_class($this);
$model=new $class(null);
return $model;
}
マイモデル:
Extends an abstract class which extends GxActiveRecord.
ビュー:
<?php
$this->breadcrumbs = array(
$model->label(2) => array('index'),
Yii::t('app', 'Create'),
);
$this->menu = array(
array('label'=>Yii::t('app', 'List') . ' ' . $model->label(2), 'url' => array('index')),
array('label'=>Yii::t('app', 'Manage') . ' ' . $model->label(2), 'url' => array('admin')),
);
?>
<h1><?php echo Yii::t('app', 'Create') . ' ' . GxHtml::encode($model->label()); ?></h1>
<?php
$this->renderPartial('_form', array(
'model' => $model,
'buttons' => 'create'));
?>
ラインのindex.phpの12
ini_set(“memory_limit”,”512M“);
アイデア?
あなたは渡されたモデルオブジェクトを使用していると思われる、その部分的に苦痛なクエリを実行していますか?クエリを投稿すると、最適化されていない可能性があります。 –