method to solve the error of Ecshop website under PHP5.4 environment

Source: Internet
Author: User
Tags explode


Run Ecshop home page error: appear below this on the words:

Strict standards:only variables should is passed by reference into d:\**\includes\cls_template.php on line 406 No. 406: $tag _s el = Array_shift (Explode (', $tag));

Solution 1 5.3 5.4 Above version of the problem, should also be related to configuration as long as 406 lines to split this sentence into two is no problem.

$tag _sel = array_shift (Explode (', $tag));

Change into:


$tag _arr = Explode (", $tag);
$tag _sel = Array_shift ($tag _arr);

(experimentally, absolutely feasible) because the Array_shift parameters are passed by reference, more than 5.3 of the default can only pass specific variables, and can not be modified through the function return value solution to remember to clean up the cache.

2, php5.4 Environment installation Ecshop appears includes/lib_base.php on line 346 solution.

Change the function gd_version () in cls_image.php to a static function gd_version ().

3 Site Background Verification Code does not show PHP Strict standards:redefining already defined constructor for class Captcha in D:\web\322\includes\cls_capt Cha.php on line 119

Open includes/cls_captcha.php

Find the following code


function __construct ($folder = ', $width = 145, $height = 20)
{
$this->captcha ($folder, $width, $height);
}

Move it to

function Captcha ($folder = ', $width = 145, $height = 20)

The top.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.