The php version is constantly updated and updated. Since php7.0 was launched, php5.5 is outdated, but php5.5 is currently used many times. Next, make up a few articles about ECSHOP in PHP5.5
The php version is constantly updated and updated. Since php7.0 was launched, php5.5 is outdated, but php5.5 is currently used many times. Next, make up a few articles about ECSHOP in PHP5.5
Ecshop has not been modified yet. If the ecshop program is installed on the php Virtual Host of the High Version, compatibility issues may occur.
The following two error messages are prompted when you install php5.5 in the local environment:
Only variables shocould be passed by reference php
Deprecated: preg_replace (): The/e modifier is deprecated, use preg_replace_callback instead ...?
Through searching on the network, Xiao Bian found that it was not only installed in a lower version of php, but also found a solution for you to debug the program in php5.5. Here we will share the solution:
First, describe the solution to the first problem:
For php 5.3 or later versions, there is no problem as long as the 418 line splits this sentence into two sentences.
Set the following:
$ Tag_sel = array_shift (explode ('', $ tag ));
To:
$ Tag_arr = explode ('', $ tag); $ tag_sel = array_shift ($ tag_arr );
Because the array_shift parameter is passed by reference, by default, more than 5.3 can only pass specific variables, but cannot return values through the function.
Solution to the second error:
Find the file: include/cls_template.php
Run the following code:
Return preg_replace ("/{([^ \} \ {\ n] *)}/e", "\ $ this-> select ('\ 1 ');", $ source );
Modify:
Return preg_replace_callback ("/{([^ \} \ {\ n] *)}/", function ($ r) {return $ this-> select ($ r [1]) ;}, $ source );
At present, xiaobian only encounters these two errors. If other problems are encountered during program debugging and development, if they can be solved, xiaobian will also work out the solution.
Solution to ecshop errors in PHP of High Version
1. When ecshop prompts Strict Standards: Non-static method cls_image
: Gd_version () shocould not be called statically inE:/wwwroot/weirenchou/schemdes/lib_base.php on line 346
Find row 346.
Return cls_image: gd_version ()
Replace:
$ P = new cls_image (); return $ p-> gd_version ();
2. the following error occurs during ecshop:
Deprecated: preg_replace (): The/e modifier is deprecated, use preg_replace_callback instead in/ecshop/repldes/cls_template.php on line 300
Open the ecshop directory and find lines 3 to 300th, which contain "des/cls_template.php ".
Set
Return preg_replace ("/{([^/}/{/n] *)}/e", "/$ this-> select ('// 1 ');", $ source );
Replace
Return preg_replace_callback ("/{([^/}/{/n] *)}/", function ($ r) {return $ this-> select ($ r [1]) ;}, $ source );
3. Strict Standards: Only variables shocould be passed by reference in E:/web/shopex/nodes des/cls_template.php on line 422
$ Tag_sel = array_shift (explode ('', $ tag ));
Changed:
$ Tag_arr = explode ('', $ tag); $ tag_sel = array_shift ($ tag_arr );
4. Member Integration
Phpbb: set_cookie () shocould be compatible with integrate/Des/modules/integrates/phpbb. php on line 232110 row function set_cookie ($ username = "")
Modify
Function set_cookie ($ username = "", $ remember = NULL) des/modules/integrates/phpwind6.php
The same is true for ucenter. php vbb. php.
Modify ucenter. php line 210
Function add_user ($ username, $ password, $ email, $ gender =-1, $ bday = 0, $ reg_date = 0, $ md5password = '')
Change row 127
Function login ($ username, $ password, $ remember = NULL)
5. Database Backup appears
Edefining already defined constructor for class cls_ SQL _dump/admin/includes/cls_ SQL _dump.php on linefunction _ construct (& $ db, $ max_size =) {$ this-> cls_ SQL _dump ($ db, $ max_size );}
Move to function cls_ SQL _dump (& $ db, $ max_size = 0)
Non-static method cls_ SQL _dump: get_random_name () admin/database. php on line 64
Open mongodes/cls_ SQL _dump.php
479 rows
Function get_random_name ()
Modify
Static function get_random_name ()