开源版18.5升级20.1.1,upgrade.php显示空白
开源版18.5升级20.1.1,PHP版本为v7.0.33,使用源码包ZenTaoPMS-20.1.1-php7.0.zip,进行覆盖升级,重启服务后,打开upgrade.php页面显示如下错误信息。
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Fatal error: Unknown: Failed opening required '' (include_path='.:/opt/zbox/run/lib/php') in Unknown on line 0
将/opt/zbox/app/zentao/www/upgrade.php的文件权限修改为755,然后再打开upgrade.php,不会出现上述错误信息,但是页面显示空白。
修改/opt/zbox/app/zentao/config/my.php,$config->debug = true; 重启服务后,打开upgrade.php页面还是显示空白。
在/opt/zbox/app/zentao/tmp/log路径下php开头的日志文件没有新日志内容产生。
停止zbox,备份zbox目录,下载linux一键安装包ZenTaoPMS-20.1.1-zbox_amd64.tar.gz,解压后,用原来的mysql数据库文件和 zentao/www/data/upload 覆盖到新目录,启动zbox的时候报错如下,麻烦指导一下,谢谢。
14:59:46.58 INFO ==> Get xxd token from zentao
/opt/zbox/bin/lib/libcomm.sh: line 576: /opt/zbox/bin/mysql: No such file or directory
14:59:46.62 WARN ==> Failed to get xxd token from zentao, retry in 1 second
14:59:47.62 INFO ==> Get xxd token from zentao
/opt/zbox/bin/lib/libcomm.sh: line 576: /opt/zbox/bin/mysql: No such file or directory
14:59:47.65 WARN ==> Failed to get xxd token from zentao, retry in 2 second
14:59:48.65 INFO ==> Get xxd token from zentao
/opt/zbox/bin/lib/libcomm.sh: line 576: /opt/zbox/bin/mysql: No such file or directory
14:59:48.68 WARN ==> Failed to get xxd token from zentao, retry in 3 second
14:59:49.68 ERROR ==> Failed to get xxd token from zentao
(1)旧zbox导出sql命令可以参考:(cat /opt/zbox/app/zentao/config/my.php 通过这个命令可以查看数据库连接信息)
/opt/zbox/run/mysql/ -h 127.0.0.1 -u root -p123456 zentao>zentao.sql
(2)新zbox导入sql,参考这个命令(注意:在导入sql备份之前,可以删除重建下zentao库,然后再导入)
登录禅道数据库:/opt/zbox/bin/mysql -h 127.0.0.1 -u root -P 3306 -p123456
选择库:use zentao;
使用source命令导入mysqldump导出的备份sql
2、附件迁移
可以把旧zbox附件目录迁移到新zbox对应的目录
/opt/zbox/app/zentao/www/data/upload/1
3、迁移之后访问禅道网址中会强制访问upgrade.php,可以在附件中下载upgrade.php 放到/opt/zbox/app/zentao/www/目录下,然后给upgrade.php文件增加读写权限
4、访问禅道,按照提示进行升级
访问禅道,按照提示进行升级
ERROR 1292 (22007): Truncated incorrect INTEGER value: 'account-browse'
MariaDB [zentao]>
SET GLOBAL sql_mode='';
SET GLOBAL innodb_flush_log_at_trx_commit=0;
然后在执行修复的sql看下
Query OK, 0 rows affected (0.000 sec)
MariaDB [(none)]> SET GLOBAL innodb_flush_log_at_trx_commit=0;
Query OK, 0 rows affected (0.000 sec)
MariaDB [(none)]> use zentao;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [zentao]> ALTER TABLE `zt_privrelation` CHANGE `priv` `priv` mediumint(8) unsigned NOT NULL DEFAULT '0';
ERROR 1292 (22007): Truncated incorrect INTEGER value: 'account-browse'
MariaDB [zentao]> desc zt_privrelation;
+--------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+-------+
| priv | varchar(100) | NO | PRI | NULL | |
| type | varchar(30) | NO | PRI | | |
| relationPriv | varchar(100) | NO | PRI | NULL | |
+--------------+--------------+------+-----+---------+-------+
3 rows in set (0.001 sec)
可以先执行以下命令,再导入sql备份:
SET GLOBAL sql_mode='';
SET GLOBAL innodb_flush_log_at_trx_commit=0;
如果还行的话,可以建议从18.5 先升级到18.12 ,然后在升级到20.1.1