I have a script that was developed and can no longer reach the developer. It's not old either.
Anyhow, it was running fine on a dedicated server with WHM, Cpanel... but I recently had to move to a new host.
I made sure the new host server matched the old server. Same php, apache, mysql... just slightly newer version of cpanel.
I went through all of the php options and made sure set up the same. Checked locales too.
PROBLEM:
Throughout the code, there are two methods used to capture datetime value.
- Code: Select all
'timestamp' => new Zend_Db_Expr('NOW()'),
OR
- Code: Select all
$action->timestamp = date('Y-m-d H:i:s');
I've made sure that the value is right, by placing a mail() near these kinds of lines to send me the value generated. It's correct.
But... the value is given to zend framework which handles the mysql insert, the value in the datetime field ends up as 0000-00-00 00:00:00
I don't know much about zend framework... but it's driving me crazy. I changed the datetime type to varchar and the value zend framework attempts to insert is just 2012... so mysql is not accepting that value and results in 0000-00-00 00:00:00
I have no idea why it's doing this. Same code, almost identical server setup.
Couple differences with the new server is that it has suhosin and mod_security installed. But I dont know why that would make difference.
I would be grateful for any suggestions.
Thank you

