Home >Backend Development >PHP Tutorial >Related issues during the Ecshop installation process: cls_image::gd_version() and JPEG_PHP tutorial not supported

Related issues during the Ecshop installation process: cls_image::gd_version() and JPEG_PHP tutorial not supported

WBOY
WBOYOriginal
2016-07-13 10:26:57901browse

When installing Ecshop, I encountered two problems:

 1.Strict Standards: Non-static method cls_image::gd_version() should not be called statically in D:Xwwwecshopinstallincludeslib_installer.php on line 31

Solution: Find line 31 in install/includes/lib_installer.php return cls_image::gd_version(); Then find line 678 in include/cls_image.php and find that the gd_version() method does not declare static, so Something will go wrong. At this time, just:

 1) Change function gd_version() to static function gd_version().

 2) Or change line 31 return cls_image::gd_version(); in install/includes/lib_installer.php to:

<span>1</span> <span>$p</span> = <span>new</span><span> cls_image();
</span><span>2</span> <span>return</span> <span>$p</span>->gd_version();

2. When detecting the environment, it prompts: Whether JPEG is supported or not is not supported.

Solution: Check and find that there is libjpeg.lib library and GD2 library. They are all loaded and they are normal. Check the ecshop source code and find that in line 100 of install/includes/lib_installer.php, JPEG is written as JPG,

The correct one should be:

<span>$jpeg_enabled</span> = (<span>$gd_info</span>['JPEG Support']        === <span>true</span>) ? <span>$_LANG</span>['support'] : <span>$_LANG</span>['not_support'];

Why does it say that Ecshop wrote it wrong? Because when I printed the array $gd_info, the key name inside was: JPEG Support. The values ​​in the $gd_info array are directly called system environment variables.

 3.Default time zone problem: Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in D:Xwwwecshopinstallincludeslib_installer.php on line 225

 Solution: Method 1, remove the ";" before date.timezone in php.ini and change it to: date.timezone = PRC;

Method 2, use ini_set('date.timezone','Asia/Shanghai');

in the header of the page

Method 3, use date_default_timezone_set() in the header to set date_default_timezone_set('PRC'); //East Eighth Time Zone echo date('Y-m-d H:i:s');

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/820780.htmlTechArticleWhen installing Ecshop, I encountered two problems: 1.Strict Standards: Non-static method cls_image:: gd_version() should not be called statically inD:Xwwwecshopinstallincludesli...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn