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,去掉前面的; |
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); |
本帖最后由 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" |
本帖最后由 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结束符(?>)后面的空白行去掉。 |
本帖最后由 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就正常显示 |
|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )
GMT+8, 2024-11-26 01:32 , Processed in 0.063790 second(s), 23 queries .
Powered by Discuz! X3
© 2001-2013 Comsenz Inc.