Fatal Error:cannot Declare self-referencing constant "" How to Solve

Source: Internet
Author: User
Tags yii
Fatal Error:cannot Declare self-referencing constant ""
This post was last edited by Ayayad on 2013-11-25 10:19:51

Fatal Error:cannot Declare self-referencing constant ""
This is an error in the YII framework
Error file: framework\db\cdbcommand.php
Error content:

Public function Prepare ()
{
if ($this->_statement==null)
{
Try
{
$this->_statement= $this->getconnection ()->getpdoinstance ()->prepare ($this->gettext ());/******** This is the line error ******************/
$this->_paramlog=array ();
}
catch (Exception $e)
{
Yii::log (' Error in preparing SQL: '. $this->gettext (), Clogger::level_error, ' System.db.CDbCommand ');
$errorInfo = $e instanceof pdoexception? $e->errorinfo:null;
throw new CDBException (Yii::t (' Yii ', ' Cdbcommand failed to prepare the SQL statement: {error} ',
Array (' {error} ' = = $e->getmessage ())), (int) $e->getcode (), $errorInfo);
}
}
}


Situation Description: Generally do not appear this error, that is, do not know how to run a site for a period of time (about 3-4 days) after the report this error, only restart Apache will be restored, but after a period of time will still appear.

Ask for advice, thank you!

------Solution--------------------
Not the original error of Yii, I don't know.
But on the Internet only to find your this and yii related issues, no one else you have ....
You're going to have to keep track of the mistakes you've given, you might find problems.
Since the visit is frequent, it may be related to insufficient system resources.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.