MySQL Error

Hey everyone.  I was trying my best not to post a request for help, but I'm getting frustrated!  I had my web app working just fine locally (in a wamp env) but now that I've moved it to a Linux hosting env, I'm having some issues.

http://staging-prett…hp?r=site/login

You can put in anything there and you get the following error below.  On another note, the Aptana Cloud is really cool!

Thanks for helping.

Description

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2030 This command is not supported in the prepared statement protocol yet

Source File

/home/aptana/domains/staging-prettydecent.aptanacloud.com/web/htdocs/protected/yii/framework/db/CDbCommand.php(285)

00273:                $this->_statement->execute();

00274:            else

00275:                $this->_statement=$this->getConnection()->getPdoInstance()->query($this->getText());

00276:            if($method==='')

00277:                return new CDbDataReader($this);

00278:            $result=$this->_statement->{$method}($mode);

00279:            $this->_statement->closeCursor();

00280:            return $result;

00281:        }

00282:        catch(Exception $e)

00283:        {

00284:            Yii::log('Error in executing SQL: '.$this->getText(),CLogger::LEVEL_ERROR,'system.db.CDbCommand');

00285: throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',

00286:                array('{error}'=>$e->getMessage())));

00287:        }

00288:    }

00289: }

Stack Trace

#0 /home/aptana/domains/staging-prettydecent.aptanacloud.com/web/htdocs/protected/yii/framework/db/CDbCommand.php(231): CDbCommand->queryInternal('fetch', 2)

#1 /home/aptana/domains/staging-prettydecent.aptanacloud.com/web/htdocs/protected/yii/framework/db/schema/mysql/CMysqlSchema.php(165): CDbCommand->queryRow()

From reading - it looks like it has something to do with fetch() and PDO.

looks like you have some problem with the sql command, you may want to post your model and controller code here, so that others could help you to check it

Try setting 'emulatePrepare' in app config for the db connection?

The model and controller are pretty simple - and were working on my localhost … so I did some Googling.

Qiang - I changed public $emulatePrepare=true; in DDbConnection.php and that seems to fix the problem.  Are there any implications to this?

Whoa!  We wrote that at the exact same time!  Even down to the second!

I'll leave it as false in CDbConnection and move the setting to the app config.