This
article deals with the 1364 error. It has the info for 3.0x the same info applies to 3.1x but a different php file.
You can find the php file referenced in the article for 3.1x
here.
Hopefully some of the helpful members here can fill in any details you may need.