I have a website that is built with Smarty 3 template engine in PHP 7, and when uploading it to the web server (Apache), it serves a blank page instead of the constructed html. The website works 100% perfect in the local environment, but the server seems to not like something going on.
The output I get when using,
ini_set('display_errors', 1);
error_reporting(E_ALL + E_NOTICE);
echo('<br>PHP version:' . phpversion());
is,
PHP version:
5.2.9
Fatal error: Call to undefined function
spl_autoload_register()
in/www/mydomain.com/html/assets/inc/vendor/smarty/Autoloader.php
on line 81
Now I am positive that the two different versions of PHP aren't causing this issue, as I have uploaded and run other .php
files to the server in the past (PHP 7 as well), and they display fine to the client.
What I am not understanding is how the spl_autoload_register()
function is not defined because the function is definitely there on line 81 of Autoloader.php
, and it's not like it isn't available to the version of PHP running on the webserver (see the docs).
Is it maybe the /html
path?. The /html
directory on the webserver is where the index.*
file goes along with all the other pages and their assets, so I am not putting them in the wrong spot... but why is the path going from /www/mydomain.com
into /html
, shouldn't it be going right into /assets
?
Really hope this made sense, thank you in advance!