1
stonez
Internal Error - Upgrade from 2.3.3b to 2.5.8
  • 2018/11/10 4:00

  • stonez

  • Just popping in

  • Posts: 16

  • Since: 2002/9/29


Hi there,
I have an old website built with Xoops 2.3.3b and customized theme and module.
Recently, I would like to upgrade Xoops 2.3.3b to 2.5.9 to be able to use with PHP 7.2.11
Environment:
OS: Linux
Apache: 2.0
PHP: 7.2.11
MySQL: 5.0.12
Xoops: 2.3.3b upgrade to 2.5.9

I was able to execute to this step:
Resized Image


When I was ready to update old modules, it showed this error message:
Resized Image


Where should I start to debug?
What settings should look into? xoops_data/data/secure.php xoops/html/mainfile.php or others?

Thank you!
Stonez

2
geekwright
Re: Internal Error - Upgrade from 2.3.3b to 2.5.8

The most likely cause of the error is some code in an old module which includes the phrase:
=& new

An example of this would look something similar to:
$object =& new ClassName();


That syntax was deprecated in PHP 5, but is now an error in PHP 7. The "=&' is assigning a value by reference, but the return of "new" is already a reference. Remove the "&" and that should fix it.

It would be worth checking to see if any PHP 7 ready upgrades are available for any modules you may be using.

3
stonez
Re: Internal Error - Upgrade from 2.3.3b to 2.5.8
  • 2018/11/10 23:01

  • stonez

  • Just popping in

  • Posts: 16

  • Since: 2002/9/29


Hi Geekwright ,
Thank you for the reply!
Let me try to see any of that command was used in the code first!

Will get back to you soon.

Best regards,
Stonez

4
stonez
Re: Internal Error - Upgrade from 2.3.3b to 2.5.8
  • 2018/11/11 7:21

  • stonez

  • Just popping in

  • Posts: 16

  • Since: 2002/9/29


Hi Geekwright,
I have used the Linux command grep --include=*.php -rnw './' -e "=& new" from Linux command to find all text with "=& new" and edit all "=& new" to "= new". and it worked!!

Thank you very much!!

From Xoops 2.3.3b to Xoops 2.5.9, here all the files I have updated.

./modules/dictionary/reader.php:261: $this->_ole =& new OLERead();
./modules/extcal/class/pear/Calendar/Decorator/Wrapper.php:68: $ret =& new $decorator($Calendar);
./modules/extcal/class/ExtcalPersistableObjectHandler.php:53: $obj =& new $this->className();
./modules/tad_player/class/fckeditor/editor/plugins/ImageManager/Classes/Transform.php:133: $obj =& new $classname;
./modules/thadmin/admin/help.php:25:$tpl =& new XoopsTpl();
./modules/thadmin/admin/index.php:25:$tpl =& new XoopsTpl();
./modules/thadmin/extras/cp_functions.php:57: $admTpl =& new XoopsTpl();
./modules/thadmin/extras/cp_functions.php:198: $admTpl =& new XoopsTpl();
./modules/thadmin/include/cp_functions.php:46: $adminThemeFactory =& new XoopsThAdminThemeFactory();
./modules/tinyd0/admin/mytplsform.php:98: $diff =& new Text_Diff( file( $basefilepath ) , explode("\n",$tpl['tpl_source']) ) ;
./modules/tinyd0/admin/mytplsform.php:99: $renderer =& new Text_Diff_Renderer_unified();
./modules/tinyd0/admin/mytplsform.php:116: $diff =& new Text_Diff( explode("\n",$default_source) , explode("\n",$tpl['tpl_source']) ) ;
./modules/tinyd0/admin/mytplsform.php:117: $renderer =& new Text_Diff_Renderer_unified();

5
stonez
Re: Internal Error - Upgrade from 2.3.3b to 2.5.8
  • 2018/11/11 7:40

  • stonez

  • Just popping in

  • Posts: 16

  • Since: 2002/9/29


Although I was able to update all the modules I have installed to latest version, few of them still refuse to work

1. TinyD module: HTTP ERROR 500
2. PiCal module: Error: Call to undefined function ereg()

Still looking for solutions!

Thanks,

Stonez

6
geekwright
Re: Internal Error - Upgrade from 2.3.3b to 2.5.8

Quote:

stonez wrote:
...
2. PiCal module: Error: Call to undefined function ereg()
...


The whole family of ereg functions were removed in PHP 7. They had been deprecated since PHP 5.3.

Here is a stackoverflow explanation and recipe for replacing ereg():
https://stackoverflow.com/questions/6270004/how-can-i-convert-ereg-expressions-to-preg-in-php

Login

Who's Online

406 user(s) are online (297 user(s) are browsing Support Forums)


Members: 0


Guests: 406


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits