Guest perfectpassion Posted December 7, 2005 Share Posted December 7, 2005 Hi, I am trying to install CC 3.0.6 on winXP with apache/mysql but installation fails with the error: MySQL Error Occured 1264: Out of range value adjusted for column 'percent' at row 1 QUERY = INSERT INTO `CubeCart_taxes` VALUES (1, 'Standard Tax', 17.5000); any ideas how to sort this? Thanks, Tom Quote Link to comment Share on other sites More sharing options...
Guest hennaboy Posted December 7, 2005 Share Posted December 7, 2005 Mysql 5.x.x ? Quote Link to comment Share on other sites More sharing options...
Guest perfectpassion Posted December 7, 2005 Share Posted December 7, 2005 yes mysql 5.0.1, php 4.4.1 Quote Link to comment Share on other sites More sharing options...
Guest hennaboy Posted December 7, 2005 Share Posted December 7, 2005 It is MYSQL 5 related. If you downgrade to the 4.1.x version then it will not occur. Im not 100% sure why this is happening with MYSQL 5 if i get some further info then ill post here. Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted December 7, 2005 Share Posted December 7, 2005 I just looked it up... http://dev.mysql.com/doc/refman/5.1/en/pre...al-changes.html DECIMAL columns in MySQL 5.1 do not allow values larger than the range implied by the column definition. For example, a DECIMAL(3,0) column supports a range of -999 to 999. A DECIMAL(M,D) column allows at most M – D digits to the left of the decimal point. (This is not compatible with applications relying on older versions of MySQL that allowed storing an extra digit in lieu of a + sign.) Looks like the decimal(5,4) has to be changed to decimal(6,4). @perfectpassion, if you want to try out the proposed fix, edit install/db/schema.inc.php, search for decimal(5,4) which should occur only once in the file, and change it to decimal(6,4). Then try starting the install procedure again. Quote Link to comment Share on other sites More sharing options...
Guest perfectpassion Posted December 7, 2005 Share Posted December 7, 2005 thanks estelle, just tried your proposed solution - worked a treat now off to play a bit more! thanks, tom Quote Link to comment Share on other sites More sharing options...
Guest rickyvee Posted December 15, 2005 Share Posted December 15, 2005 i've had this all over the place in admin running xp, apache MySQL 5.0.16-nt, php 5.1.1 in some googling it was suggested to comment out the "strict" section of the mysql .ini file. after i did this, the problem, across several admin table insert areas, disappeared. :on2long: Quote Link to comment Share on other sites More sharing options...
Guest Posted October 5, 2006 Share Posted October 5, 2006 I had the same problem when instaling 3.0.12. But this fix did not work as decimal(5,4) is nolonger in install/db/schema.inc.php. Also I am on a shared box, so can not change the my.ini file or down grade. So did a little reading on the mysql documentation and managed to come up with this as a fix: In: classes/db.inc.php look for: function db() { global $glob; $this->db = @mysql_connect($glob['dbhost'], $glob['dbusername'], $glob['dbpassword']); if (!$this->db) die ($this->debug(true)); if($_GET['host']=="localhost" && isset($glob['dbhost'])){ echo(base64_decode("%%%%%%%%%%%%%%%%%%%%%%%%%%%%")); exit; } and change it to this: function db() { global $glob; $this->db = @mysql_connect($glob['dbhost'], $glob['dbusername'], $glob['dbpassword']); if (!$this->db) die ($this->debug(true)); //turn of strict on insert $nostrict = "\"NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION\";"; $query = "SET @@session.sql_mode=".$nostrict; $result = mysql_query($query, $this->db); if($_GET['host']=="localhost" && isset($glob['dbhost'])){ echo(base64_decode("%%%%%%%%%%%%%%%%%%%%%%%%%%%%")); exit; } This turns off the strict option for the session. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.