|
4 o; Y7 g, @2 U8 f7 _/ l0 G6 s3 }( e# j
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 错误- m1 m/ j3 K4 t3 Y3 h
解决:找到install/includes/lib_installer.php中的第31行 return cls_image::gd_version();然后在找到include/cls_image.php中的678行,发现gd_version()方法未声明静态static,所以会出错。这时候只要:
& j2 m% w: D! H: l 1)将function gd_version()改成static function gd_version()即可。) C2 M; ^8 d5 z8 q6 s
2)或者将install/includes/lib_installer.php中的第31行return cls_image::gd_version();改成:
/ D- D9 _8 P0 `6 |; l' \" M$p = new cls_image();1 i8 k% b0 D {5 U2 o6 z
return $p->gd_version();
1 Y" V# C) @$ d( ]. ^! y! P4 C
) C) z" A. C& n; S, g2 ?. u/ t7 z4 h- K( C! p
下载ECShop网店系统V2.7.0正式版,解压,上传后,安装进程进行到第3步:“配置系统”,点击“立即安装”后弹出“安装程序监视器”窗口,内容显示如下:
6 f5 C. A5 r1 K+ b& w; u& h安装进程已中止# z9 T/ ^% P7 P. {
创建配置文件............成功
9 s/ F8 M6 K- n1 l创建数据库............成功
# D: B% t" d* d7 b- O! A安装数据............成功
; [: I! Y* P" l: f( d, Q: f创建管理员帐号............成功
& u+ y3 y1 h1 p0 M处理其它............失败
4 L. E C$ b% D5 X5 u
1 E! U2 w4 | xWarning: mkdir() [function.mkdir]: No such file or directory in /home4/skyrunne/public_html/7dbay/install/includes/lib_installer.php on line 528, P( ^2 S/ V( y
无法创建目录,无法创建目录
; j8 |7 A( m4 V7 O& b- |& C# H, V解决方法如下:
, Z/ x E1 N+ T6 n9 G( T/ V点击“立即安装”前,不选择屏幕最下方的复选框安装测试数据:
- Z$ h {: B% ^(选择此项,将默认全选预选商品类型) ,就可以顺利完成,反之就会出现如上的错误提示。. X( l! B- v) ~ m. T7 Z, m" z6 j3 _
不安装测试数据库一样可用,一样正常,不是问题.....' p* p8 F* W/ x$ v" O( K5 T
愿看到此文章的朋友能解决问题;
7 j. [9 k0 G9 `3 S% B. X1 ^/ n, {' Z5 R- v4 A( z- }+ O
8 r1 j% _+ A/ l& d- ~
ecshop如何解决includes\cls_template.php on line 418错误
1 Q7 x7 R3 S5 N; R/ v- }
' X. |+ G* z2 L$ u/ e4 f之前遇到过的问题,一直很苦恼,到底该怎么解决,现在终于找到了解决的方法,现在分享给大家看下,问题如下所示:
) }8 Z7 h( F: T. u( H/ s' I% R( |Strict Standards: Only variables should be passed by reference in upload\includes\cls_template.php on line 418
?( ~$ x) j$ U! m第418行:$tag_sel = array_shift(explode(' ', $tag));
3 u8 F i5 P: h' u- x
: q' y2 y1 b/ A解决办法 1:" S0 E, _7 G( x [# I) t
5.3以上版本的问题,应该也和配置有关 只要418行把这一句拆成两句就没有问题了 $tag_sel = array_shift(explode(' ', $tag)); 改成: 2 [5 T) M% ?$ C$ X0 K
+ Y6 y" z& f( q$ K2 }: t* I
$tag_arr = explode(' ', $tag); $tag_sel = array_shift($tag_arr);
4 ~2 p9 `% m& b# R. K(实验过,绝对可行) 因为array_shift的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值# {6 S- C( u" V5 q: ~
同理举一反三:遇到函数嵌套错误时可以分开写,错误自然解决
4 k2 K+ D, c; s7 L8 G - P+ ^. p6 f% x; p- p
如:
5 a* L7 [( L8 Hfunction get_dyna_libs($theme, $tmp)& r+ W# d( K8 E) a
{4 T( ]+ k! ?% f5 m/ ?$ e' u
$extsub = explode('.', $tmp);" t' X5 b$ [% S% ~4 H* u
$ext = end($extsub);& g. n7 ^) A0 a( K6 |' C
$tmp = basename($tmp,".$ext");2 o9 c: I% k A0 y4 q% V1 J' ~
$sql = 'SELECT region, library, sort_order, id, number, type' .
" a& U: g4 e5 P3 }; \' }/ s# ?' FROM ' . $GLOBALS['ecs']->table('template') .
- K" ~$ p& C) G" WHERE theme = '$theme' AND filename = '" . $tmp . "' AND type > 0 AND remarks=''".+ {; H, W8 _* k
' ORDER BY region, library, sort_order';$ c2 F4 H" S. ~6 @2 N; B
$res = $GLOBALS['db']->getAll($sql);
6 m) }# \+ o7 y( k" n0 J! r) |$dyna_libs = array();5 W. \8 f/ D4 M
foreach ($res AS $row)
6 s' l& }. f! _, A, w: c8 w{
8 |, F5 X, p' k$dyna_libs[$row['region']][$row['library']][] = array(
' A' g( c2 N; ['id' => $row['id'],
3 @1 C: b0 E4 q4 t& A% K'number' => $row['number'],
4 L- o% n2 I6 u9 Q4 g% C'type' => $row['type']5 }) N3 Z% c: p* {+ ?0 h
);
" S& X3 _3 C) _+ h& n* Z+ |}; k, I, Y' {: K$ G+ ~8 ?$ R- M
return $dyna_libs;
0 W( P0 ?7 R, \0 y; l& g+ E}+ J4 I! V% `* t! v- I D/ d# G
! x, K: ]5 Q- n
将$ext = end(explode('.', $tmp));
9 r I4 E- b+ _, T% k; {& }改为
) d& F1 u/ b0 i" j& _# c0 i: F. D$extsub = explode('.', $tmp);! o* N) ^8 r: D9 Y2 C& O- L
$ext = end($extsub);( L7 O; h. Z: j) S
! X8 i; g( l: Z! c! |
解决办法 2(屏蔽错误) :
, }4 ]5 J0 _" ^% ^$ I" D, l" X , m3 x4 G/ h0 Q" S8 o$ H2 }
或则如果这样配置的话: error_reporting = E_ALL | E_STRICT
! t3 y$ Q0 l$ V' Dphp.ini中有如下设置:7 r- i9 c5 i! q* q) [
error_reporting = E_ALL | E_STRICT+ z9 X `0 A& h; ^$ X; C
* l/ t: `# C# z2 G" E9 G这是说,显示那些不符合编码规范的警告(coding standards warnings)。
! e o* M7 W2 hJoomla其实是建议取消error的输出,如果出于调试需要,应改为
$ E/ T3 w' \" p5 L+ Z- ?0 [error_reporting = E_ALL & ~E_NOTICE
* J3 f& y& V1 ?) k) o# d
# l# @, b0 d' `7 x* F; A y问题得到解决。, o/ M7 L& a$ \0 V
; e* j$ a4 R! n: p; M. ~* v
1 X! C# D' T4 Y4 J1 UEcshop出现问题 includes\lib_main.php on line 1329 includes\lib_base.php on line
& M3 E$ |5 B7 y% w' o5 c) u1 W7 R( ^php 5.3版本兼容问题不少,以上函数参数传递问题可以将lib_main.php on line 1329这句 $ext = end(explode('.', $tmp));
. A6 G- n9 \+ x- ?改为 :( f' `% e% ?9 _ m% b3 Z
$extsub=explode('.', $tmp);$tmp=end($extsub);+ j0 v$ W" B9 F
3 A/ |) D2 @. U$ ]- n; F5 m3 P |
|