2

そこで私は、いくつかの科学データを管理するアプリケーションを備えた 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“);

何か案は?

4

1 に答える 1

4

メッセージ

[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

は、変数の前の $ 記号が抜けていることを示しています。

index.php の 12 行目を指定してください。問題が上記のソースにあるとは思いません。

メッセージ

[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

多くの場合、特定のループしている PHP 操作または複雑なクエリを示します。

PHP メモリの量を増やすこともできますが、実際の問題はおそらく解決されません。

于 2012-04-18T21:53:01.413 に答える