I recently updated to Joomla 5x from 4x and also moved to php 8.2x
I have managed to fix other issues with plugins and so on but have one outstanding issue with some custom work I had done (basically 3 php files that automatically via cron jobs import files from another source).
Now when they run (which i can test via URL) they throw a 500 error.
When I enable the error reporting and debug, the error on front end shows under Stack Trace:
Code: Select all
ClassNotFoundError
HTTP 500 Whoops, looks like something went wrong.
Attempted to load class "Juri" from the global namespace.
Did you forget a "use" statement?
Symfony\Component\ErrorHandler\Error\ClassNotFoundError:
Attempted to load class "Juri" from the global namespace.
Did you forget a "use" statement?
at /home/mysite/public_html/myfolder/script_myscriptphp:46
Under the Exception it shows:
Code: Select all
Symfony\Component\ErrorHandler\Error\
ClassNotFoundError
in /home/mysite/public_html/myfolder/script_myscript.php (line 46)
error_reporting(E_ALL);
define('AMDEBUG',1);
define('IMGPATH',0);
define('READFLAG',2);
define('REMOVEIFLE',1);
define('URI_ROOT',Juri::root()."../");//define("imgSourcePath",Juri::root().'media/myfolder2/temp/');$propSubMapToCat = array();//$stausidMapPropstatus = array();$propSubMapToCat[0] = 2194;$propSubMapToCat[1] = 37;
Code: Select all
[12-Apr-2024 10:17:34 UTC] PHP Warning: Undefined variable $baseURL in /home/mysite/public_html/myfolder/script_myscript.php on line 47
[12-Apr-2024 10:17:34 UTC] PHP Warning: session_name(): Session name cannot be changed after headers have already been sent in /home/mysite/public_html/libraries/vendor/joomla/session/src/Storage/NativeStorage.php on line 392
From the error messages reported would anybody know what might be causing my issues? Unfortunately the developer is no longer around to ask.
Kind regards