您现在的位置是:首页 > cms教程 > Ecshop商城教程Ecshop商城教程
ecshop安装常见报错的解决方法
梦柏2025-02-07Ecshop商城教程已有人查阅
导读在安装Ecshop的时候,遇到两个问题:1.Strict Standards: Non-static method cls_image::gd_version() should not be called statically in D:\X\ \ecshop\install\includes\l
在安装Ecshop的时候,遇到两个问题:
1.Strict Standards: Non-static method cls_image::gd_version() should not be called statically in D:\X\ \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();改成:
解决:查看发现有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\ \ecshop\install\includes\lib_installer.php on line 225
解决:方法1,将php.ini里是date.timezone前的";"去掉,改成:
1.Strict Standards: Non-static method cls_image::gd_version() should not be called statically in D:\X\ \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\ \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');
本文标签:
很赞哦! ()
相关教程
图文教程
ecshop购物车页面继续购物按钮怎么改成回到上一步
ecshop购物车页面继续购物按钮改成回到上一步的修改方法:大家都知道,ecshop 的购物车页面有的继续购物按钮是返回到首页的,而这样是非常不利于用户体验的
ecshop后台会员列表页怎么增加按手机查询会员
1、首先修改程序文件 admin/users.php找到;2、修改模板文件 admin/templates/users_list.htm找到
ecshop增加调用字段的方法实例
一、ecshop文章列表页调用缩略图、网页描述等打开includes/lib_article.php文件,大约在69行 添加如果需要调用描述,需要在sql语句添加description
ecshop在线调查,ecshop会员访问在线调查
ECSHOP在线调查。进入网店后台,点击左侧导航栏中的文章管理 -> 在线调查。一 调查主题:填写调查主题。二 调查选项
相关源码
-
(自适应)居家生活日用品纸盘纸盒纸杯卫生纸巾生产厂家pbootcms模板为纸品生产企业打造的现代化展示平台,自动适应各种设备屏幕,确保浏览体验一致,完善的SEO功能,提升网站曝光度,基于PbootCMS构建,源码开放可定制。查看源码 -
(自适应)绿色园林建筑花卉园艺艺术模板免费下载为景观设计及园艺企业打造的响应式网站框架,基于PbootCMS系统开发,帮助传统园林行业建立现代化数字展示平台。采用标准DIV+CSS前端架构,代码精简无冗余。查看源码 -
(自适应)互联网建站网络公司个人工作室网站模板基于PbootCMS内核开发,围绕「技术方案展示」「成功案例库」「服务流程说明」三大模块构建,支持PC与移动端数据实时同步。附带包含客户评价、行业解决方案的完整测试数据包查看源码 -
(PC+WAP)中英双语户外用品帐篷装备pbootcms网站模板下载这款基于PbootCMS开发的中英文双语模板专为户外装备行业设计,适配PC和移动设备。模板采用现代化设计风格,突出户外产品的功能性和实用性,帮助企业建立专业的国际化展示平台。查看源码 -
(PC+WAP)盆栽绿植观赏植物花卉租赁免费pbootcms网站模板为花卉盆栽租赁、园林绿化企业打造的PbootCMS网站模板,采用较新内核开发,PC与移动端数据实时同步。通过清新自然的视觉设计,精准展现植物养护、花卉展示等业务场景,帮助用户快速建立专业级行业网站。查看源码 -
(响应式)wordpress模板VieuV4.5主题资讯自媒体博客源码Vieu主题专注于个人博客与企业展示场景,采用响应式设计确保在手机、电脑、平板等多设备上的展示。主题集成会员中心、投稿系统、内容保护等实用功能,满足现代博客网站的建设需求。查看源码
| 分享笔记 (共有 篇笔记) |
