美文网首页
ECShop的lamp安装

ECShop的lamp安装

作者: zwb_jianshu | 来源:发表于2019-08-02 20:25 被阅读0次

一、软件简介

ECSHOP 通用电子商务平台
----------------------------------------------------------------------
ECSHOP是一款开源免费的通用电子商务平台构建软件,使用她您可以非常方便的开一个网上商店,在网上开展自己的生意。
为了您更好的使用ECSHOP,请阅读docs目录下面的相应文档,如果这些文档无法满足您的需要,您可以访问我们的网站获得支持:
1. 官方网站:http://www.ecshop.com
2. 讨论社区:http://bbs.ecshop.com
非常感谢您在众多的软件中选择了ECShop。相信她会帮助您的事业蒸蒸日上。

二、安装环境

cat /etc/redhat-release 
getenforce 
systemctl status firewalld.service 
systemctl status iptables.service 
ifconfig  eth0

三、安装软件包并配置数据库,下载php和apache、mariadb包

rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm                         
yum install httpd mariadb-server mariadb  php56w php56w-xml  php56w-gd php56w-mysql php56w-mbstring -y 
systemctl restart  mariadb.service
systemctl enable  mariadb.service
systemctl restart httpd
systemctl enable  httpd
mysql_secure_installation 
mysql 
create database ecshop character set utf8 collate utf8_bin;
grant all privileges on ecshop.* to ecshop@localhost identified by 'ecshop';
grant all privileges on ecshop.* to ecshop@'%' identified by 'ecshop';
FLUSH PRIVILEGES;
SHOW DATABASES;
SHOW GRANTS FOR 'ecshop'@'localhost';

四、上传ecshop的安装包/var/www/html/ecshop,并授权apache

unzip   ECShop_V2.7.3_UTF8_release0411.zip
chown  -R apache.apache  /var/www/html/*

五、浏览器访问:http://10.0.0.75/ecshop/upload

image.png
在安装Ecshop的时候,遇到两个问题:
1.Strict Standards: Non-static method cls_image::gd_version() should not be called statically in D:\X\www\ecshop\install\includes\lib_installer.php on line 31
解决:找到install/includes/lib_installer.php中的第31行   return cls_image::gd_version();然后在找到include/cls_image.php中的678行,发现gd_version()方法未声明静态static,所以会出错。这时候只要:
1)将function gd_version()改成static function gd_version()即可。
2)或者将install/includes/lib_installer.php中的第31行return cls_image::gd_version();改成:
$p = new cls_image();
return $p->gd_version();
2.检测环境的时候提示:是否支持 JPEG是不支持的。
解决:查看发现有libjpeg.lib库,GD2库也有,都加载了,也都正常。查看ecshop源代码发现install/includes/lib_installer.php中第100行,JPEG写成了JPG,正确的应该是:
$jpeg_enabled = ($gd_info['JPEG Support']        === true) ? $_LANG['support'] : $_LANG['not_support'];
 为何说Ecshop写错了,因为我打印数组$gd_info的时候,里面的键名是:JPEG Support。而$gd_info数组里的值都是直接调用系统环境变量的。
3.默认时区问题:Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in D:\X\www\ecshop\install\includes\lib_installer.php on line 225
解决:方法1,将php.ini里是date.timezone前的";"去掉,改成:date.timezone = PRC;
方法2,在页头使用 ini_set('date.timezone','Asia/Shanghai');
方法3,在页头使用date_default_timezone_set()设置 date_default_timezone_set('PRC'); //东八时区 echo date('Y-m-d H:i:s');
image.png image.png image.png

修改配置:

[root@k8s-master ecshop]# vim /var/www/html/ecshop/upload/includes/lib_time.php
function gmtime()
{
   date_default_timezone_set("UTC");
   return (time() - date('Z'));
}
image.png image.png

修改配置:

解决方法:
include/cls_image.php
将这一行:
function gd_version()
改成
static function gd_version()
然后替换文件之后刷新就解决问题。
image.png image.png image.png image.png

相关文章

网友评论

      本文标题:ECShop的lamp安装

      本文链接:https://www.haomeiwen.com/subject/lwerdctx.html