Help - Search - Members - Calendar
Full Version: MySql error after changes in shipping module
CubeCart Forums > CubeCart Version 3 > Installation & Upgrade Help (Version 3)
Worti
Hi everyboby

after the installation on my server i would like to setup something.

When i would change Free Shipping i recive the error:

MySQL Error Occured
1264: Out of range value adjusted for column 'default' at row 4

QUERY = UPDATE sn_CubeCart_Modules SET `status`='1', `default`= '' WHERE module = 'shipping' AND folder = 'Free_Shipping'

same by per Percent and others. But i can change the Shopname without a problem.
Moneybookers and paypal works fine...

Anyone have an idee?

Requirements: Win 2003 Server, Mysql 5 and PHP 5

Thanks a lot.

Worti
Worti
I found a solution after few hours in the forum.... biggrin.gif

QUOTE
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:

CODEfunction 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:
CODEfunction 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.


Worti
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.