|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ContentStrategist Smarty n00b
Joined: 31 May 2021 Posts: 2
|
Posted: Mon May 31, 2021 10:45 pm Post subject: Fatal error: Uncaught Error: Class Smarty_Internal_Template |
|
|
I'm new to Smarty and have been battling a number of errors in getting this going. Currently when I load the index.php, I see these four "Fatal error"s (separated by a line below) in my web browser:
Fatal error: Uncaught Error: Class "Smarty_Internal_Data" not found in C:\xampp\htdocs\tshirtshop\libs\smarty-3.1.39\libs\sysplugins\smarty_internal_templatebase.php:49 Stack trace: #0 {main} thrown in C:\xampp\htdocs\tshirtshop\libs\smarty-3.1.39\libs\sysplugins\smarty_internal_templatebase.php on line 49
Fatal error: Uncaught Error: Class "Smarty_Internal_TemplateBase" not found in C:\xampp\htdocs\tshirtshop\libs\smarty-3.1.39\libs\sysplugins\smarty_internal_template.php:27 Stack trace: #0 {main} thrown in C:\xampp\htdocs\tshirtshop\libs\smarty-3.1.39\libs\sysplugins\smarty_internal_template.php on line 27
Fatal error: Uncaught Error: Class "Smarty_Resource" not found in C:\xampp\htdocs\tshirtshop\libs\smarty-3.1.39\libs\sysplugins\smarty_internal_resource_file.php:18 Stack trace: #0 {main} thrown in C:\xampp\htdocs\tshirtshop\libs\smarty-3.1.39\libs\sysplugins\smarty_internal_resource_file.php on line 18
Fatal error: Uncaught Error: Class "Smarty_Internal_TemplateBase" not found in C:\xampp\htdocs\tshirtshop\libs\smarty-3.1.39\libs\Smarty.class.php:109 Stack trace: #0 C:\xampp\htdocs\tshirtshop\presentation\application.php(4): require_once() #1 C:\xampp\htdocs\tshirtshop\index.php(19): require_once('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\tshirtshop\libs\smarty-3.1.39\libs\Smarty.class.php on line 109
My setup is XAMPP with MariaDB(MySQL) and PHP: all with recent releases from earlier this year. There seems to be an issue with this type of code: require_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_templatebase.php'; and it seems to prefer just to put the URL path, but IDK if that's the issue I'm running into here. My understanding is that Smarty is designed to work out of the box, so I'm hesitant to change anything in the code. It could be a user error, such as something I did in config or php.ini. I've also read that certain ways of coding don't work anymore with recent PHP, so a theory is that the way this was coded is an example of that. I'm hoping a veteran will look at this and know exactly what's going on. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sat Jun 05, 2021 11:01 pm Post subject: |
|
|
How did you load Smarty? That's rather strange.
You don't have to include anything manually, Smarty is using autoloader for years now. |
|
Back to top |
|
ContentStrategist Smarty n00b
Joined: 31 May 2021 Posts: 2
|
Posted: Mon Jun 07, 2021 6:53 pm Post subject: |
|
|
Thanks for the reply Anr, I would probably end up needing more help than just this issue, so for now I'm planning on just using HTML/PHP to get the site going and then might revisit Smarty later. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Jun 09, 2021 4:34 pm Post subject: |
|
|
If this is a new project, just use Composer already.
Will make everything way simpler. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|