View previous topic :: View next topic |
Author |
Message |
Tsukkie Smarty Rookie
Joined: 31 Jul 2013 Posts: 7
|
Posted: Wed Jul 31, 2013 7:33 pm Post subject: Fatal error: Uncaught exception 'SmartyCompilerException' |
|
|
So im going through a lot of trouble solving this.
http://imageshack.us/photo/my-images/855/po42.jpg/
***application.php
<?php
// Reference Smarty library
require_once SMARTY_DIR . 'Smarty.class.php';
/* Class that extends Smarty, used to process and display Smarty
files */
class Application extends Smarty
{
// Class constructor
public function __construct()
{
// Call Smarty's constructor
parent::__construct();
// Change the default template directories
$this->setTemplateDir(TEMPLATE_DIR);
$this->setCompileDir(COMPILE_DIR) ;
$this->setConfigDir(CONFIG_DIR);
$this->setPluginsDir(array(SMARTY_DIR . 'plugins,', PRESENTATION_DIR . 'smarty_plugins'));
}
}
?>
***index.php
<?php
// Include utility files
require_once 'include/config.php';
require_once BUSINESS_DIR . 'error_handler.php';
// Set the error handler
ErrorHandler::SetHandler();
// Load the application page template
require_once PRESENTATION_DIR . 'application.php';
//require_once PRESENTATION_DIR . 'link.php';
// Load the database handler
require_once BUSINESS_DIR . 'database_handler.php';
// Load Business Tier
require_once BUSINESS_DIR . 'catalog.php';
// Load Smarty template file
$application = new Application();
// Display the page
$application->display('store_front.tpl');
// Close database connection
DatabaseHandler::Close();
?>
Trying to finish this for my capstone. I am using wamp over xamp also |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Jul 31, 2013 7:46 pm Post subject: |
|
|
I can barely make out the error message in that photo, but it looks like you have a syntax error in your template (?) |
|
Back to top |
|
Tsukkie Smarty Rookie
Joined: 31 Jul 2013 Posts: 7
|
Posted: Thu Aug 01, 2013 9:33 am Post subject: |
|
|
Im not sure about the template. its the one I download from smarty. I checked the line and cant see what is wrong with it |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Aug 01, 2013 9:49 am Post subject: |
|
|
The error Message in your jpg is Not readable.
What ist the error message? |
|
Back to top |
|
Tsukkie Smarty Rookie
Joined: 31 Jul 2013 Posts: 7
|
Posted: Thu Aug 01, 2013 4:02 pm Post subject: |
|
|
( ! ) Fatal error: Uncaught exception 'SmartyCompilerException' with message ' in C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_templatecompilerbase.php on line 667
( ! ) SmartyCompilerException: Syntax Error in template "c:wamp\www\tshirtshop\presentation\templates\store_front.tpl" on line 33 "" - Unexpected "department_list.tpl} </div> </div> </div> </body> </html> " in C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_templatecompilerbase.php on line 667 |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Aug 01, 2013 4:23 pm Post subject: |
|
|
What does store_front.tpl look like? somewhere around line 33. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Aug 01, 2013 4:26 pm Post subject: |
|
|
This:
Code: | Unexpected "department_list.tpl} |
Makes me think you are missing a quote just before the closing brace. |
|
Back to top |
|
Tsukkie Smarty Rookie
Joined: 31 Jul 2013 Posts: 7
|
Posted: Thu Aug 01, 2013 4:34 pm Post subject: |
|
|
the quote! ty so much! iwish notepadd++ has intellencense
You guys are awesome! |
|
Back to top |
|
Tsukkie Smarty Rookie
Joined: 31 Jul 2013 Posts: 7
|
Posted: Thu Aug 01, 2013 4:40 pm Post subject: |
|
|
but i am getting one more error =/
ERRNO: 2
TEXT: filemtime(): stat failed for c:wamp/www/tshirtshop/presentation/templates_c\e6ce78d75661933d805bcd0a8636ec0bb661810e.file.departments_list.tpl.php
LOCATION: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_resource.php, line 720, at August 1, 2013, 4:32 pm
Showing backtrace:
filemtime("c:wamp/www/tshirtshop/presentation/templates_c\e6ce78d75661933d8...") # line 720, file: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_resource.php
Smarty_Template_Source.getCompiled(Object: Smarty_Internal_Template) # line 659, file: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_template.php
Smarty_Internal_Template.__get("compiled") # line 154, file: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_templatebase.php
Smarty_Internal_TemplateBase.fetch(null, null, null, null, false, false, true) # line 286, file: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_template.php
Smarty_Internal_Template.getSubTemplate("departments_list.tpl", null, null, null, null, Array[0], "0") # line 49, file: C:\wamp\www\tshirtshop\presentation\templates_c\86ea552304ced606ea5a8d94e03ae6811529b8c4.file.store_front.tpl.php
content_51f1774f335805_21317413(Object: Smarty_Internal_Template) # line 180, file: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_templatebase.php
Smarty_Internal_TemplateBase.fetch("store_front.tpl", null, null, null, true) # line 374, file: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_templatebase.php
Smarty_Internal_TemplateBase.display("store_front.tpl") # line 23, file: C:\wamp\www\tshirtshop\index.php |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Aug 01, 2013 5:10 pm Post subject: |
|
|
Code: | filemtime(): stat failed |
Looks like file was deleted that it was expecting. Did you clear out cache/compiled files and then see this happen? Is the error consistent when you reload the page?
You might see short-lived notices like this if you clear out compiled or cached files on a live system. |
|
Back to top |
|
Tsukkie Smarty Rookie
Joined: 31 Jul 2013 Posts: 7
|
Posted: Thu Aug 01, 2013 5:33 pm Post subject: |
|
|
how do i clear cache/compiled files? this error is consistent everytime i reload the page. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Aug 02, 2013 8:34 am Post subject: |
|
|
Delete all Files in the template_c and cache subfolder |
|
Back to top |
|
|