Cake php 1.3.14 suddenly stop save data while it was working before

67 Views Asked by At

Hi I have a site developed in cake php 1.3.14. so in this it was on a server and it was working fine.

But I have migrated the server and set up all code there, and now the data does not save in mysql.

//Data

Array
 (
    [ListOfTeacher] => Array
    (
        [first_name] => Sunil
        [last_name] => Rawat
        [dob] => Array
            (
                [month] => 09
                [day] => 05
                [year] => 2007
            )

        [empid] => e001
        [list_of_house_id] => 1
        [list_of_class_id] => 1
        [username] => sunilrawat
        [password] => indivar@123
        [qualification] => mca
        [is_admin] => 0
        [uniqueid] => retret
    )

)

if ($this->ListOfTeacher->save($this->data)) {
            $this->Session->setFlash(__('The list of teachers has been saved', true));
            $this->redirect(array('action' => 'index'));
        } 
        else {
                $this->Session->setFlash(__('Record could not be saved. Please follow the instructions.', true));
        }

Now its goes to else condition everything.

Can anyone please assist what could be the issue.

Thanks in advance

1

There are 1 best solutions below

0
On BEST ANSWER

I would suggest turning on MySQL logging to help debug the issue. First run set global general_log = "ON";, and then run show variables, and find the general_log_file setting. Copy that path, do a tail -f on it in your console, and try the save again. It should let you know if there are any issues on the MySQL side. Good luck.