Menu

Fresh install Windows 2008 R2

Help
Bas
2013-05-16
2013-05-21
  • Bas

    Bas - 2013-05-16

    Hi,

    I was wondering if anyone is having the same problem as we have on our development/production server:

    We have a fresh installation of Windows 2008 R2, IIS (7.0), PHP(5.4.13, Fast-CGI), MySQL (5.5.30). But when the installation is finished I get the following warning "Incorrect date value: '1992' for column 'cuando' at row 1", but setup is completed and ready to enjoy.

    Going to the index.php is resulting in the following error: "Fatal error: Call to a member function FetchRow() on a non-object in C:\inetpub\wwwroot\tematres\common\include\fun.sql.php on line 2885".

    After doing some research, I noticed that the DB is not being filled. And also not all tables are present. Inspecting the install.php, we discovered that the following table is failing:

    $result9 = $DB->Execute("CREATE TABLE ".$prefix."values (
    value_id int(11) NOT NULL auto_increment,
    value_type varchar(64) NOT NULL default '',
    value longtext NOT NULL default '',
    value_order tinyint(4) default NULL,
    value_code varchar(20) default NULL,
    PRIMARY KEY (value_id),
    KEY value_type (value_type)
    ) DEFAULT CHARSET=utf8 ENGINE=MyISAM COMMENT='general values table';") ;

    And in particular the line: "value longtext NOT NULL default ''," this line raises the following error: "longtext cannot have default value".

    I can pin this down to the "sql-mode" of the MySQl server, when turning off "STRICT_TRANS_TABLES" (STRICT MODE) it works (but this is only a work around and no solution).

    Here are some references we found:
    http://stackoverflow.com/questions/3466872/why-cant-a-text-column-have-a-default-value-in-mysql
    http://dev.mysql.com/doc/refman/5.0/en/blob.html

    I hope someone can help me with this problem, and turning off strict mode is NOT an option.

     
  • diego

    diego - 2013-05-16

    Hi, Bas, we will fix the issue about "Incorrect date value: '1992' " in the next minor release. About the other issue ... is an issue that did not know :(
    Can you try to add a default value, for example '0' in the install script? (We do noy have Windows 2008 R2 ... )

    thank you in advance

     
  • Bas

    Bas - 2013-05-17

    Hi Diego,

    I tried the following:

    CREATE TABLE test_values (
    value_id int(11) NOT NULL auto_increment,
    value_type varchar(64) NOT NULL default '',
    value longtext NOT NULL default '0',
    value_order tinyint(4) default NULL,
    value_code varchar(20) default NULL,
    PRIMARY KEY (value_id),
    KEY value_type (value_type)
    ) DEFAULT CHARSET=utf8 ENGINE=MyISAM COMMENT='general values table';") ;

    But still giving the same error, I think you can reproduce this when enabling "STRICT_TRANS_TABLES" (STRICT MODE) on your MySQL installation (Windows):

    Set the SQL mode to strict
    sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

    If we use: "value longtext default NULL," it works btw, but not sure what the consequences are?

    With kind regards,
    Bas

     

    Last edit: Bas 2013-05-17
  • diego

    diego - 2013-05-21

    Hi Bas... your solution looks fine and there are no bad consequences. In fact... we adopt your solution in the standard source code since the next release.

    Please let me know about any doubt or problem

    best

     

Log in to post a comment.