|
2 c M" L/ A4 J, P2 c$ L/ Z 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 错误
3 g1 E6 s- b' j8 G, l! B2 X 解决:找到install/includes/lib_installer.php中的第31行 return cls_image::gd_version();然后在找到include/cls_image.php中的678行,发现gd_version()方法未声明静态static,所以会出错。这时候只要:: W" e2 j+ p- ?/ j
1)将function gd_version()改成static function gd_version()即可。5 ?& M7 x2 Y: o8 _0 y, R
2)或者将install/includes/lib_installer.php中的第31行return cls_image::gd_version();改成:9 i- i1 {8 I1 }2 v$ y3 K
$p = new cls_image();/ g+ V5 D1 @7 L
return $p->gd_version();. Y( M. [3 f; E* C+ e( t* V3 V, V
% x; H1 Y% T8 i8 y. p- f8 E8 A3 Z
3 h4 `+ ?( ?$ B: B/ l下载ECShop网店系统V2.7.0正式版,解压,上传后,安装进程进行到第3步:“配置系统”,点击“立即安装”后弹出“安装程序监视器”窗口,内容显示如下:
: V5 N9 T6 f5 I) H+ ^安装进程已中止: H2 S7 V' b; }$ t: d
创建配置文件............成功
' [' N- ^- y4 A创建数据库............成功
! F, |7 ^7 X5 x+ J1 o: Y安装数据............成功) c9 d# g1 ? y/ D9 D' ?
创建管理员帐号............成功! H, L! L2 b5 O7 ~9 Z8 S* E
处理其它............失败8 L" {- P* u3 u" \
" L/ Y, ?/ J/ [; A; `; P$ R: F
Warning: mkdir() [function.mkdir]: No such file or directory in /home4/skyrunne/public_html/7dbay/install/includes/lib_installer.php on line 528
) w' v! [1 e8 Q. ?/ c/ x* w无法创建目录,无法创建目录% n8 H: a$ q* |4 ?
解决方法如下:3 @$ v/ d! `$ M( q, @6 i V& C
点击“立即安装”前,不选择屏幕最下方的复选框安装测试数据: 5 j0 d/ b9 ?/ c( D/ [
(选择此项,将默认全选预选商品类型) ,就可以顺利完成,反之就会出现如上的错误提示。
, Y% C b* {2 v1 A) `不安装测试数据库一样可用,一样正常,不是问题.....
1 w8 Z6 o5 M4 T9 T愿看到此文章的朋友能解决问题;
1 b' ?2 k% c A$ |; b; H( z
5 k8 S3 t% Q+ [% ~0 ~4 l) g. Z$ \
% D' F% g1 o% P& ?! iecshop如何解决includes\cls_template.php on line 418错误
& V' ^3 I6 i D E. s" N
# ^9 u% Z5 `4 e; w! \3 Q* ^之前遇到过的问题,一直很苦恼,到底该怎么解决,现在终于找到了解决的方法,现在分享给大家看下,问题如下所示:. t0 i( B! j+ s8 b6 {
Strict Standards: Only variables should be passed by reference in upload\includes\cls_template.php on line 418" j$ L. R1 r, S+ O0 f
第418行:$tag_sel = array_shift(explode(' ', $tag));8 R- j9 a6 b1 d# ?7 d
6 k$ `# O4 F' Z' S3 T
解决办法 1:
* d* b% h/ q5 T6 u5.3以上版本的问题,应该也和配置有关 只要418行把这一句拆成两句就没有问题了 $tag_sel = array_shift(explode(' ', $tag)); 改成:
% T2 ]8 ]) k- e L9 |7 R2 X- ^
$tag_arr = explode(' ', $tag); $tag_sel = array_shift($tag_arr);
8 `& Q. v0 }/ {+ k" c(实验过,绝对可行) 因为array_shift的参数是引用传递的,5.3以上默认只能传递具体的变量,而不能通过函数返回值8 u! ?. c# D+ i$ L9 J
同理举一反三:遇到函数嵌套错误时可以分开写,错误自然解决
3 Q4 g$ g7 B6 F' e, A4 d9 u* l i- n
! j/ y, U0 j9 Y! {* l' b5 K9 q如:, d+ W& C s& o* p" m' W& W4 x) P
function get_dyna_libs($theme, $tmp)% S( ^7 I" ~& h ^* K8 y9 c
{3 [3 U4 Z( ?, u0 V! i
$extsub = explode('.', $tmp);: L; `0 v( i$ E- k
$ext = end($extsub);. o7 @8 p$ Y% f' \7 y/ }9 X
$tmp = basename($tmp,".$ext");
/ u; J' C: a, {% ^$ T& [* j3 [$sql = 'SELECT region, library, sort_order, id, number, type' .1 z% Q" S- a$ m+ d0 b6 k
' FROM ' . $GLOBALS['ecs']->table('template') . m/ u5 {' M t3 O2 Y7 w
" WHERE theme = '$theme' AND filename = '" . $tmp . "' AND type > 0 AND remarks=''".2 i- @& r' f9 `7 r
' ORDER BY region, library, sort_order';
$ v3 ^5 A, g9 v$res = $GLOBALS['db']->getAll($sql);$ Z7 n/ O) j \
$dyna_libs = array();( }; K, h" `, {- J
foreach ($res AS $row)5 m6 M3 b# r0 @: q5 J6 j, P
{
- j$ H- N7 U9 Q. _$dyna_libs[$row['region']][$row['library']][] = array(
; B5 f% E) d5 j'id' => $row['id'],4 _+ M6 o. F3 W$ T' v A1 |
'number' => $row['number'],
7 ?) w3 E3 v' X% b9 C6 C'type' => $row['type']; h" J" ?6 g% p! ~* I, x
);
" n& O# g; j* b( L: Q3 l! t}
5 s! N$ J+ [2 }. i2 Lreturn $dyna_libs;' v& k! s; r* H7 s y5 u/ @* c
}
4 G2 d& q) b( K5 `( f3 m
: j* _; t p* \& x6 I6 s( V将$ext = end(explode('.', $tmp));
7 w7 j% Z, ?. q. D6 _5 H改为
% s. i# X2 j1 ^8 H9 Y+ J/ K+ v$extsub = explode('.', $tmp);
* j$ C: C# W" p' Z' Y/ O u; b0 s$ext = end($extsub);
1 b4 Z, e7 U6 @/ Y
4 K2 e9 o2 W8 k5 Y# ~$ H5 |解决办法 2(屏蔽错误) :
" C; [2 X. p. N) v. m+ G( ?7 l ! _% o: @% i/ b4 w* n5 @8 s3 p
或则如果这样配置的话: error_reporting = E_ALL | E_STRICT0 A3 t+ w3 C$ ?
php.ini中有如下设置:; w3 @" V' D' T# z6 n
error_reporting = E_ALL | E_STRICT+ T/ f5 @+ ~9 s1 S* _
% N: B% ]2 s/ B( Q( t1 x
这是说,显示那些不符合编码规范的警告(coding standards warnings)。
- ?8 x4 U& R4 E9 uJoomla其实是建议取消error的输出,如果出于调试需要,应改为* y: y: q3 Y0 ?. w" j7 e2 Y0 h& v
error_reporting = E_ALL & ~E_NOTICE4 S) {' G( i: b( j6 a1 ]3 ?
* S# q! \8 t; A
问题得到解决。
1 X* c; j& T+ ?0 y8 i
- j" A- b1 i B
2 Z, V6 L6 x0 N6 m6 F% tEcshop出现问题 includes\lib_main.php on line 1329 includes\lib_base.php on line" m" h/ F- b+ k" l0 b/ @3 c
php 5.3版本兼容问题不少,以上函数参数传递问题可以将lib_main.php on line 1329这句 $ext = end(explode('.', $tmp)); j( X3 M% B$ t% n# d$ t% e
改为 :
7 O- m L8 u: L+ P* j4 }! @$extsub=explode('.', $tmp);$tmp=end($extsub);
: i, X' f1 g. u2 T8 W0 H9 `. j0 i2 {% W, \& h3 S% I
|
|