I have a website which I need to move but it seems that it doesn't work with PHP7.3.12 due to some old PHP funtions and the old 5.x is not an option this time :(
Firstly I had an error:
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /var/www/vhosts/dddd.eu/bbbgg.cdddd.eu/in_site/autoload.php on line 3
Fatal error: Uncaught Error: Call to undefined function sg_load() in /var/www/vhosts/dddd.eu/bbbgg.cdddd.eu/in_site/core/libraries/sql.class/sql.class.php:2 Stack trace: #0 /var/www/vhosts/dddd.eu/bbbgg.cdddd.eu/in_site/autoload.php(83): require_once() #1 [internal function]: __autoload('SQL') #2 /var/www/vhosts/dddd.eu/bbbgg.cdddd.eu/in_site/config.php(70): spl_autoload_call('SQL') #3 /var/www/vhosts/dddd.eu/bbbgg.cdddd.eu/index.php(14): include_once('/var/www/vhosts...') #4 {main} thrown in /var/www/vhosts/dddd.eu/bbbgg.cdddd.eu/in_site/core/libraries/sql.class/sql.class.php on line 2
I fixed the line 3 by changing it from __autoload($ClassName) to spl_autoload_register($ClassName)
Which caused me a new error:
Fatal error: Cannot redeclare spl_autoload_register() in /var/www/vhosts/dddd.eu/bbbgg.cdddd.eu/in_site/autoload.php on line 129
Here is the whole code of autoload.php - https://pastebin.com/1Qj3pFPH
What can cause this issue?