Strange behaviour

Please help :(

I am baffled by the behaviour of an application I have deployed on three different servers. It works as expected on two of the servers but on the third it exhibits a strange behaviour when updating or creating an instance of one domain class, which I cannot explain. All three servers have identical copies of the application and yii v1.0.5. I am using Sqlite3 as the database.

Domain class 



Unit(id,identity,password,gpslocation,......)


The controller update action



 $unit=$this->loadUnit();


 if(isset($_POST['Unit'])) {   


            if($unit->save())


                 $this->redirect(array('show','id'=>$unit->id));


 }


 $this->render('update',array('unit'=>$unit));


If I output the $_POST['Unit'] attributes prior to calling save() they contain the  expected values, however once save() is called attributes identity and password are changed to the same value '2147483647'. Same condition occurs on create. I have no idea where this value is coming from. The weird thing is it only occurs on one server.

Any ideas where I could look for the issue.

Aiden.

Enable logging and see what is the SQL being executed (which should also show the parameter values)?

Agggghh  >:(

Turns out it was caused by the fact that both the identity and password fields were declared as BIGINT and the value being inserted was causing an overflow. Must be something to do with the version of sqlite on the hosted server exhibiting the problem. Changed the fields to varchar and kept the validation rule ensuring they are entered as integers and it now works ok. Should probably have configured the fields as varchar in the first place !

Thanks for your help qiang

Aiden