Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1207|回复: 8

ecmos

[复制链接]

1214

主题

1975

帖子

7486

积分

认证用户组

Rank: 5Rank: 5

积分
7486
发表于 2020-4-16 09:33:19 | 显示全部楼层 |阅读模式

https://github.com/hechengjin/ecmos
基于PHP的C2C,O2O商城,提供在线的免费升级服务,此版本是对外的ecmall开放版本,简称ECMOS(全称ECMALL OPEN SYSTEM),由360cd.cn提供的ECMALL开放版本,包括了合并支付,退货退款,统一支付,余额管理,三级分销,微信功能,以及应用市场,以及在线升级功能,开发版地址http://ecm.kf.360cd.cn:8000,QQ 交流群:47101787
回复

使用道具 举报

1214

主题

1975

帖子

7486

积分

认证用户组

Rank: 5Rank: 5

积分
7486
 楼主| 发表于 2020-4-16 09:33:44 | 显示全部楼层
本帖最后由 Qter 于 2020-4-16 10:09 编辑

Fatal error: Cannot use 'Object' as class name as it is reserved in F:\github\he_chengjin@outlook.com\ecmos\eccore\ecmall.php on line 91
我把PHP版本调到7.1就正常显示
回复 支持 反对

使用道具 举报

1214

主题

1975

帖子

7486

积分

认证用户组

Rank: 5Rank: 5

积分
7486
 楼主| 发表于 2020-4-16 10:12:53 | 显示全部楼层
本帖最后由 Qter 于 2020-4-16 10:16 编辑

ecmos.png

修改D:\programs\php-7.1.32-Win32-VC14-x64\php.ini
把extension=php_gd2.dll前面的;注释去掉

回复 支持 反对

使用道具 举报

1214

主题

1975

帖子

7486

积分

认证用户组

Rank: 5Rank: 5

积分
7486
 楼主| 发表于 2020-4-16 10:19:07 | 显示全部楼层
本帖最后由 Qter 于 2020-4-16 10:45 编辑

ecmosdb.png
admin/123456


Fatal error: Uncaught Error: Call to undefined function mysql_connect() in F:\github\he_chengjin@outlook.com\ecmos\install\app\default.app.php:170 Stack trace: #0 F:\github\he_chengjin@outlook.com\ecmos\install\app\installer.base.php(63): DefaultApp->config_done() #1 F:\github\he_chengjin@outlook.com\ecmos\eccore\controller\app.base.php(114): InstallerApp->index() #2 F:\github\he_chengjin@outlook.com\ecmos\eccore\controller\app.base.php(32): BaseApp->_run_action() #3 F:\github\he_chengjin@outlook.com\ecmos\eccore\ecmall.php(80): BaseApp->do_action('index') #4 F:\github\he_chengjin@outlook.com\ecmos\install\index.php(16): ECMall::startup(Array) #5 {main} thrown in F:\github\he_chengjin@outlook.com\ecmos\install\app\default.app.php on line 170

mysql_connect 改为 mysqli_connect
D:\programs\php-7.1.32-Win32-VC14-x64\php.ini文件中把下面的扩展打开
extension=php_mysqli.dll下面两个也设置一下
extension_dir = "D:\programs\php-7.1.32-Win32-VC14-x64\ext"
cgi.fix_pathinfo=1

Call to undefined function mysql_select_db()
换成低版本的php  php-5.3.8-Win32-VC9-x86


ecmosok.png
回复 支持 反对

使用道具 举报

1214

主题

1975

帖子

7486

积分

认证用户组

Rank: 5Rank: 5

积分
7486
 楼主| 发表于 2020-4-16 10:48:33 | 显示全部楼层
本帖最后由 Qter 于 2020-4-16 11:15 编辑

http://localhost/index.php

Warning: date() [function.date]: 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 'UTC' for '8.0/no DST' instead in F:\github\he_chengjin@outlook.com\ecmos\includes\libraries\time.lib.php on line 27

Warning: date() [function.date]: 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 'UTC' for '8.0/no DST' instead in F:\github\he_chengjin@outlook.com\ecmos\includes\libraries\time.lib.php on line 100

Warning: date() [function.date]: 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 'UTC' for '8.0/no DST' instead in F:\github\he_chengjin@outlook.com\ecmos\eccore\controller\message.base.php on line 148

Warning: date() [function.date]: 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 'UTC' for '8.0/no DST' instead in F:\github\he_chengjin@outlook.com\ecmos\eccore\controller\message.base.php on line 157

Notice: Undefined variable: _SESSION in F:\github\he_chengjin@outlook.com\ecmos\app\frontend.base.php on line 540

Notice: Use of undefined constant SESS_ID - assumed 'SESS_ID' in F:\github\he_chengjin@outlook.com\ecmos\app\frontend.base.php on line 84

Fatal error: Call to a member function get() on a non-object in F:\github\he_chengjin@outlook.com\ecmos\app\frontend.base.php on line 84

这一行的源代码如下:

$this->assign('cart_goods_kinds', $cart->get_kinds(SESS_ID, $this->visitor->get('user_id')));

产生这个错误的原因很可能是$this->visitor这个对象未正确实例化。
解决这个问题,我的办法很简单,加入对变量的检查,以下是我修改后的内容:

$this->assign('cart_goods_kinds', is_object($cart) && is_object($this->visitor) ? $cart->get_kinds(SESS_ID, $this->visitor->get('user_id')) : 0);




http://localhost/admin/index.php
Fatal error: Call to a member function get_users_count() on a non-object in F:\github\he_chengjin@outlook.com\ecmos\includes\ecapp.base.php on line 52

根目录下的includes文件夹下的ecapp.base.php该文件的$this->assign('query_user_count', $this->_session->get_users_count());这句话修改后为:$this->assign('query_user_count', is_object($this->_session) ? $this->_session->get_users_count() : 0);

其它相关


问题原因有一下几点:
1.你的APP文件没有对应的Lang文件;
2.你的APP文件和Lang文件如果是UTF编码的,可能是有BOM;
3.你的APP文件和Lang文件代码里面最后的php结束符(?>)后面有空行;
解决办法:
先查看问题1,如果确实没有对应的Lang文件,则添加之(添加方法,举个例子:如果你的APP文件是app/***.app.php,那么你的Lang文件则放在 languages/sc-utf-8/***.lang.php下)
在查看问题2,用dw等软件编辑器打开app文件或者lang文件,然后另存为,在弹出的窗口把bom的复选框去掉
再查看问题3,用dw等软件编辑器打开app文件或者lang文件,定位到代码最后一行,把php结束符(?>)后面的空白行去掉。







回复 支持 反对

使用道具 举报

1214

主题

1975

帖子

7486

积分

认证用户组

Rank: 5Rank: 5

积分
7486
 楼主| 发表于 2020-4-16 11:14:31 | 显示全部楼层
本帖最后由 Qter 于 2020-4-16 15:14 编辑

http://localhost/index.php
Fatal error: MySQL Error[1046]: No database selected MySQL Query:SHOW COLUMNS FROM ecmos_store Wrong File: F:\github\he_chengjin@outlook.com\ecmos\eccore\model\mysql.php[402] in F:\github\he_chengjin@outlook.com\ecmos\eccore\model\mysql.php on line 231

上面错误是没有走到连接数据库的代码,主要是时区设置出错,
Warning: date() [function.date]: 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 'UTC' for '8.0/no DST' instead in F:\github\he_chengjin@outlook.com\ecmos\includes\libraries\time.lib.php on line 27

在php.ini中加入
date.timezone = "Asia/Shanghai"
回复 支持 反对

使用道具 举报

1214

主题

1975

帖子

7486

积分

认证用户组

Rank: 5Rank: 5

积分
7486
 楼主| 发表于 2020-4-16 15:18:27 | 显示全部楼层
本帖最后由 Qter 于 2020-4-16 17:57 编辑

ecmo.png
ecmo_admin.gif

更多查看 https://github.com/hechengjin/ecmos


回复 支持 反对

使用道具 举报

1214

主题

1975

帖子

7486

积分

认证用户组

Rank: 5Rank: 5

积分
7486
 楼主| 发表于 2020-4-16 16:02:44 | 显示全部楼层
Notice: Undefined variable: conditions in F:\github\he_chengjin@outlook.com\ecmos\includes\libraries\zllib\biz.lib.php on line 97
Notice: Undefined variable: r_type in F:\github\he_chengjin@outlook.com\ecmos\includes\libraries\zllib\biz.lib.php on line 98
PHP默认配置会报这个错误,我的PHP版本是5.2.13,存在这个问题:
  
  Notice: Undefined variable
  
  这就是将警告在页面上打印出来,虽然这是有利于暴露问题,但实现使用中会存在很多问题。
  
  需要设置显示错误级别,来解决问题。
  
  网络上的通用解决办法是修改php.ini的配置:
  
  解决方法:
  
  1) error_reporting设置:
  
  找到error_reporting = E_ALL
  
  修改为error_reporting = E_ALL & ~E_NOTICE
  
  2) register_globals设置:
  
  找到register_globals = Off
  
  修改为register_globals = On
  
  我发现在php代码中直接使用
    
  error_reporting(E_ALL & ~E_NOTICE);
  

回复 支持 反对

使用道具 举报

1214

主题

1975

帖子

7486

积分

认证用户组

Rank: 5Rank: 5

积分
7486
 楼主| 发表于 2020-4-16 16:31:20 | 显示全部楼层
Fatal error: Call to undefined function curl_init() in F:\github\he_chengjin@outlook.com\ecmos\includes\libraries\zxlib\public\curl.lib.php on line 15

在php.ini中找到extension=php_curl.dll,去掉前面的;
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )

GMT+8, 2024-3-29 16:03 , Processed in 0.068447 second(s), 22 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表