Has anybody seen this error?




YiiBase::include(DOMDocument.php) [function.YiiBase-include]: failed to open stream: No such file or directory


Error File: /usr/local/lib/yii/YiiBase.php   Line: 338


Array

(

    [326] => 	 * @param string class name


    [327] => 	 * @return boolean whether the class has been loaded successfully


    [328] => 	 */


    [329] => 	public static function autoload($className)


    [330] => 	{


    [331] => 		// use include so that the error PHP file may appear


    [332] => 		if(isset(self::$_coreClasses[$className]))


    [333] => 			include(YII_PATH.self::$_coreClasses[$className]);


    [334] => 		else if(isset(self::$_classes[$className]))


    [335] => 			include(self::$_classes[$className]);


    [336] => 		else


    [337] => 		{


    [338] => 			include($className.'.php');


    [339] => 			return class_exists($className,false) || interface_exists($className,false);


    [340] => 		}


    [341] => 		return true;


    [342] => 	}


    [343] => 


    [344] => 	/**


    [345] => 	 * Writes a trace message.


    [346] => 	 * This method will only log a message when the application is in debug mode.


    [347] => 	 * @param string message to be logged


    [348] => 	 * @param string category of the message


    [349] => 	 * @see log


    [350] => 	 */


)



I got these errors when I was using following codes to fetch a address list from DB:




public function actionIndex()

	{		

		$params = array(

			'condition'=>'1=1',

			'order'=>'name ASC',

		);

		

		$criteria=new CDbCriteria($params);

		

		$dataProvider=new CActiveDataProvider('Address', array(

			'pagination'=>array(

				'pageSize'=>Yii::app()->params['itemsPerPage'],

			),

			'criteria'=>$criteria,

		));


		$this->render('index',array(

			'dataProvider'=>$dataProvider,

		));

	}



I don’t think there are incorrect codes in it, since I used the same method in other controllers, but others are working well. And it only shows up the errors on my test server, in my local machine, every controller works well.

Is there any suggestions?

Are you doing something with xml? DOMdocument.php obviously refers to this. So you should make sure your test-server has all the needed php xml modules installed. You could run phpinfo(); on both machines and then look out for differences regarding xml compatibility.

Hi Y!!,

Thank you very much for your comments. I changed the value for error_reporting switch (close the notice report) in PHP.ini, and it works now… :(