|
|
2 }& y7 E; J' x( ^/ R 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 错误' [/ k% e% t2 d: y' [6 L. P' N6 H" ]
解决:找到install/includes/lib_installer.php中的第31行 return cls_image::gd_version();然后在找到include/cls_image.php中的678行,发现gd_version()方法未声明静态static,所以会出错。这时候只要:$ j2 t+ _& p# t* W! w5 L ^0 q. q3 a' {
1)将function gd_version()改成static function gd_version()即可。# [4 }' V) s0 T& Z+ Z
2)或者将install/includes/lib_installer.php中的第31行return cls_image::gd_version();改成:
+ Q& e+ Z% I- V% k7 O: g9 E1 U$p = new cls_image(); t5 g' ?5 F5 X5 `" N
return $p->gd_version();
" E: C! W% F. F; r
. Y# Q! n* K/ }+ L
) F2 q3 V) @: n下载ECShop网店系统V2.7.0正式版,解压,上传后,安装进程进行到第3步:“配置系统”,点击“立即安装”后弹出“安装程序监视器”窗口,内容显示如下:: s, k( S# a, e6 G5 Z/ k" m
安装进程已中止
- f* [$ T& a! B. a创建配置文件............成功" g- ]- h) B. X! B; ?; V
创建数据库............成功
3 S) M. T1 F5 G3 g% j) \ }安装数据............成功7 K2 _' Y5 s5 R6 e
创建管理员帐号............成功
6 }% W8 @! ]4 h. x6 V5 F" `4 x处理其它............失败
3 @% z% B3 K0 q2 Z- z& |7 w* I* j$ M/ M6 W& A. k) m7 G
Warning: mkdir() [function.mkdir]: No such file or directory in /home4/skyrunne/public_html/7dbay/install/includes/lib_installer.php on line 528
: Y2 e2 Y! D( ]: x% l无法创建目录,无法创建目录
7 j& [8 ]5 g, R/ P+ G! J/ ]5 n解决方法如下:
2 R8 H8 M+ K r- v点击“立即安装”前,不选择屏幕最下方的复选框安装测试数据: ; j2 X: M6 r: l% } M
(选择此项,将默认全选预选商品类型) ,就可以顺利完成,反之就会出现如上的错误提示。
+ N; T; J/ Q( p) t不安装测试数据库一样可用,一样正常,不是问题....." H% L" W. \' W2 O0 R" l0 C3 g- [
愿看到此文章的朋友能解决问题;
/ {& j6 D( T" x/ _6 r9 j' [0 P" [2 e1 e6 \/ ]
; Q/ o) K; N; z& Yecshop如何解决includes\cls_template.php on line 418错误- c+ o8 D$ y8 i' a
8 w, ^5 K) N7 T& [之前遇到过的问题,一直很苦恼,到底该怎么解决,现在终于找到了解决的方法,现在分享给大家看下,问题如下所示:
9 l& @) T O' ]8 c7 SStrict Standards: Only variables should be passed by reference in upload\includes\cls_template.php on line 418
, j2 I. i; @ s1 U第418行:$tag_sel = array_shift(explode(' ', $tag));
" Z: Y" m% V8 J7 e1 T) M6 w ` " q6 v% [0 N( i
解决办法 1:4 }& J8 n# Y( Q* A3 o8 q- G
5.3以上版本的问题,应该也和配置有关 只要418行把这一句拆成两句就没有问题了 $tag_sel = array_shift(explode(' ', $tag)); 改成: 4 j* g$ X* ]# V+ r$ ~1 ^
$ u& E; \7 {8 e# m' S% F. \4 g
$tag_arr = explode(' ', $tag); $tag_sel = array_shift($tag_arr);( Y1 |2 ~' Q. S3 ~
(实验过,绝对可行) 因为array_shift的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值) S/ U0 V; A* x% H2 ?
同理举一反三:遇到函数嵌套错误时可以分开写,错误自然解决. w: t* g5 H, r1 S e
/ h3 x% p, U5 ~ t) x8 r如:4 ?8 P2 E1 e4 f" }1 ?
function get_dyna_libs($theme, $tmp)5 t3 G0 |( T. L; m/ b/ V
{5 w( ~5 r8 L6 n5 O4 y! J* Q
$extsub = explode('.', $tmp);8 A5 n5 E, q7 Y5 k8 b5 |" S* f: b# u
$ext = end($extsub);
( r, p% [! Q8 e- z; ]$tmp = basename($tmp,".$ext");
& {5 G9 G( \$ U" ?/ y h h# D8 Y$sql = 'SELECT region, library, sort_order, id, number, type' .! g1 R; G- e6 n. [- A
' FROM ' . $GLOBALS['ecs']->table('template') .
+ e. ^5 Y9 C- X1 S w% {! G3 A3 n" WHERE theme = '$theme' AND filename = '" . $tmp . "' AND type > 0 AND remarks=''".* ^( ^" o/ Y9 m# z9 J% @ K
' ORDER BY region, library, sort_order';' R1 m4 N8 D7 A- v# S; y/ [
$res = $GLOBALS['db']->getAll($sql);3 I p7 ]3 Z: b$ _: w7 k
$dyna_libs = array();2 i/ m! G, z) c+ @+ ^
foreach ($res AS $row)
y( o# v' F$ P; j{7 _- h: V; J1 I0 y4 b2 V
$dyna_libs[$row['region']][$row['library']][] = array(
6 v8 R5 M% |- O+ W9 d( J* ^' ]* z+ ]'id' => $row['id'],
) ?" ~3 H" O- I! I% Y'number' => $row['number'],
- n1 s& |& p, D'type' => $row['type']
; j' f7 Y+ L! E# @);
, S) A/ `* [5 i: h5 F# q}$ x/ v; ?& T3 G' P8 S$ E) L; ^
return $dyna_libs;
: `* m% y4 J4 k/ O}
4 a% s+ B4 P& ?" B O, r) d( `6 X/ P
' e7 d; @) A! v" L- y将$ext = end(explode('.', $tmp));
4 j, {/ Q5 n5 F: F改为
) F4 }- b" y$ X/ h6 I0 z; D$extsub = explode('.', $tmp);
- _' v; R. Q' S$ext = end($extsub);) i% L9 |4 b9 Q( ?) z4 H3 Z) [
9 c+ f9 R1 d- i
解决办法 2(屏蔽错误) :- a1 {; Y U/ @# @
) k0 @1 V& ~2 l: q1 y7 N或则如果这样配置的话: error_reporting = E_ALL | E_STRICT- S1 R2 V; a/ `% p/ v
php.ini中有如下设置:0 F6 k: S" w @* `/ [
error_reporting = E_ALL | E_STRICT4 |( v8 T1 g) V$ E5 J
1 k" F* R0 ?% [: _ C) C. |0 z这是说,显示那些不符合编码规范的警告(coding standards warnings)。4 n/ h2 ^0 X0 f. E7 |
Joomla其实是建议取消error的输出,如果出于调试需要,应改为3 b5 V# |' ?) H- Z+ l
error_reporting = E_ALL & ~E_NOTICE
+ D* }% z S+ k8 e6 ~1 r; U % E) Q" t( a' [* L
问题得到解决。( \0 F( N: d1 `! ^+ I$ o; E
) U1 s+ t7 z& v$ ?/ Y
9 ~" v: O1 Z9 J% k( oEcshop出现问题 includes\lib_main.php on line 1329 includes\lib_base.php on line
. d% ^7 u) |0 wphp 5.3版本兼容问题不少,以上函数参数传递问题可以将lib_main.php on line 1329这句 $ext = end(explode('.', $tmp));
8 I. C: F2 U$ _. c. B" q改为 :
# y6 u4 h% h* `% e X$ P$ c% \# N$extsub=explode('.', $tmp);$tmp=end($extsub);
# Q8 o6 g- G. k0 C' q. }; h% x2 |/ R8 s# P5 b: p: W6 j) S
|
|