gpt4 book ai didi

phpVMS - 日期值不正确 : '0000-00-00' for column 'laSTLogin' at row 1

转载 作者:行者123 更新时间:2023-11-29 18:32:58 24 4
gpt4 key购买 nike

我正在尝试安装一个名为 phpVMS 的软件,但是当我完成运行安装程序时出现错误/var/www/fly/install/includes/Installer.class.php 278 日期值不正确:第 1 行“laSTLogin”列的“0000-00-00”我查看了文件“Installer.class.php”,但找不到日期值 000-00-00。我该如何解决这个问题?

最佳答案

在文件 /install/sql/install.sql 中更改以下行:

`lastlogin` date NOT NULL DEFAULT '0000-00-00',

`lastupdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',

`postdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - TABLE phpvms_pages.

`postdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - TABLE phpvms_news.

`joindate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',

`lastpirep` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',

`submitdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',

`lastlogin` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

`lastupdate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

`postdate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - TABLE phpvms_pages.

`postdate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - TABLE phpvms_news.

`joindate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

`lastpirep` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

`submitdate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
<小时/>

在文件 /install/sql/struction.xml 中更改这两行:

<field Field="lastlogin" Type="date" Null="NO" Key="" Default="0000-00-00" Extra="" Comment="" />

<field Field="lastupdate" Type="datetime" Null="NO" Key="" Default="0000-00-00 00:00:00" Extra="" Comment="" />

<field Field="postdate" Type="datetime" Null="NO" Key="" Default="0000-00-00 00:00:00" Extra="" Comment="" /> - TABLE phpvms_pages.

<field Field="postdate" Type="datetime" Null="NO" Key="" Default="0000-00-00 00:00:00" Extra="" Comment="" /> - TABLE phpvms_news.

<field Field="joindate" Type="datetime" Null="NO" Key="" Default="0000-00-00 00:00:00" Extra="" Comment="" />

<field Field="lastpirep" Type="datetime" Null="NO" Key="" Default="0000-00-00 00:00:00" Extra="" Comment="" />

<field Field="submitdate" Type="datetime" Null="NO" Key="" Default="0000-00-00 00:00:00" Extra="" Comment="" />

<field Field="lastlogin" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" />

<field Field="lastupdate" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" />

<field Field="postdate" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" /> - TABLE phpvms_pages.

<field Field="postdate" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" /> - TABLE phpvms_news.

<field Field="joindate" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" />

<field Field="lastpirep" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" />

<field Field="submitdate" Type="TIMESTAMP" Null="NO" Key="" Default="CURRENT_TIMESTAMP" Extra="" Comment="" />
<小时/>

重新安装。

The MySQL 5.7.4 change to make strict mode more strict by includingERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE causedsome problems. For example, in MySQL 5.6 with strict mode but notNO_ZERO_DATE enabled, TIMESTAMP columns can be defined with DEFAULT'0000-00-00 00:00:00'. In MySQL 5.7.4 with the same mode settings,strict mode includes the effect of NO_ZERO_DATE and TIMESTAMP columnscannot be defined with DEFAULT '0000-00-00 00:00:00'. This causesreplication of CREATE TABLE statements from 5.6 to 5.7.4 to fail ifthey contain such TIMESTAMP columns.

You can specify CURRENT_TIMESTAMP as the default for TIMESTAMP and DATETIME columns.

关于phpVMS - 日期值不正确 : '0000-00-00' for column 'laSTLogin' at row 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45537777/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com