jasonabc Posted January 17, 2007 Share Posted January 17, 2007 Got the latest versions of OSC, PHP, MySQL and Apache running and am getting this 1264 error all over the place. I eventually found the solution on the Zen Cart forums as there was nothing on the OSC ones. Thought I'd post here as it's a MySQL config issue - not a PHP one. You will see the 1264 error a lot in OSCommerce if MySQL 5 is set to run in STRICT mode. This can be turned off by opening my.ini in the MySQL folder (C:/Program Files/MySQL....) and commenting out the following line: # sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_E NGINE_SUBSTITUTION" Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix Link to comment Share on other sites More sharing options...
ryanbehrman Posted April 5, 2007 Share Posted April 5, 2007 Got the latest versions of OSC, PHP, MySQL and Apache running and am getting this 1264 error all over the place. I eventually found the solution on the Zen Cart forums as there was nothing on the OSC ones. Thought I'd post here as it's a MySQL config issue - not a PHP one. You will see the 1264 error a lot in OSCommerce if MySQL 5 is set to run in STRICT mode. This can be turned off by opening my.ini in the MySQL folder (C:/Program Files/MySQL....) and commenting out the following line: # sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_E NGINE_SUBSTITUTION" Thanks jasonabc. That solves the issue of inserting an empty string into an integer column in MYSQL5 and hence removes 1264 errors. However, it doesn't solve the issue of inserting an empty string into a decimal column. Hence the 1366 errors still remain. E.g. in OSC, when you add a product without a weight, the following error occurs: '1366 - Incorrect decimal value: '' for column 'products_weight' at row 1'. Ryan Link to comment Share on other sites More sharing options...
ryanbehrman Posted April 5, 2007 Share Posted April 5, 2007 Ok it works now. MySQL just needed a restart :blush: Also, you only need to take out the STRICT_TRANS_TABLES, so you are left with: sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" Hope that helps. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.