In the installation of Ecshop, there are many problems encountered:
1.Strict Standards: Non-static method Cls_image::gd_version () should not being called statically in d:\x\www\ecshop\install\includes\lib_installer.php on line
Resolution: Find the 31st line in Install/includes/lib_installer.php return Cls_image::gd_version (); and then find the Include/cls_ 678 rows in image.php, the Gd_version () method is found to not declare static statics, so an error occurs. As long as:
1) Change function gd_version () to static function Gd_version ().
2) or return the 31st line in install/includes/lib_installer.php to Cls_image::gd_version (); Change to:
$p = new Cls_image (); return $p->gd_version ();
2. when detecting the environment, it is not supported to support JPEG.
Solution: View found Libjpeg.lib library, GD2 Library also has, all loaded, also all normal. View Ecshop Source code Discovery install/includes/lib_installer.php in line 100th, JPEG is written in jpg, the correct should be:
$jpeg _enabled = ($gd _info[' jpeg support ' = = = True)? $_lang[' Support ': $_lang[' not_support '];
Why say Ecshop write wrong, because I print the group $gd_info, the key name is: JPEG support. The values in the $gd_info array are called directly into the system environment variables.
3. Default time zone problem:Warning: Date_default_timezone_get (): It is not safe for rely on the system ' s timezone settings. You is *required* to use the Date.timezone setting or the Date_default_timezone_set () function. In case you used any of those methods and you is still getting this warning, your most likely misspelled the timezone Iden Tifier. We selected the timezone ' UTC ' for now, but please set Date.timezone to select your timezone. In D:\X\www\ecshop\install\includes\lib_installer.php on line 225
Solution: Method 1, the php.ini is date.timezone before the ";" Remove, change to: Date.timezone = PRC;
Method 2, use Ini_set (' Date.timezone ', ' Asia/shanghai ') on the page header;
Method 3, use Date_default_timezone_set () to set Date_default_timezone_set (' PRC ') on the page header; East Eight time zone echo date (' y-m-d h:i:s ');
4.deprecated:preg_replace () error.
Access first page after installation complete error: Deprecated:preg_replace (): the/e modifier is Deprecated, use Preg_replace_callback instead in ....
(1) Cause of error:
The modifier used in the Preg_replace () function,/E, has been deprecated in php5.5.x.
If your PHP version happens to be php5.5.x, your ecshop will surely report an error similar to the following:
Deprecated:preg_replace (): the/e modifier is Deprecated, use Preg_replace_callback instead in ...
(2) Workaround:
In fact, from the error message we can also see one or two, it prompts us to use Preg_replace_callback to replace the preg_replace.
So the workaround is as follows:
Open File includes/cls_template.php to find
Return Preg_replace ("/{([^\}\{\n]*)}/e", "\ $this->select (' \\1 ');", $source);
Replaced by
Return Preg_replace_callback ("/{([^\}\{\n]*)}/", function ($r) {return $this->select ($r [1]);}, $source);
Problem solving.
(3), if your ecshop other files also reported similar preg_replace errors, please refer to the above method to solve the problem, the solution is the same way.
5.Strict standards:only variables should be passed by reference
Source of error:
Find Code includes/cls_template.php,424 Line
$tag_sel
=
array_shift
(
explode
(
‘ ‘
,
$tag
));
Cause of error: PHP5.3 above by default can only pass specific variables, and cannot pass the function return value, so the explode in this code will have to be moved out to re-assign the value
Workaround: Replace with
$tagArr
=
explode
(
‘ ‘
,
$tag
);
$tag_sel
=
array_shift
(
$tagArr
);
The top of the error has not dropped, left and bottom of the error also need to go to Ecshop background Click Clear Cache to remove.
Ecshop problems during installation: Cls_image::gd_version (); Jpeg;deprecated:preg_replace (); Strict standards;