|
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 |
carlos_duran Smarty n00b
Joined: 20 Aug 2008 Posts: 2
|
Posted: Thu Aug 21, 2008 3:20 am Post subject: |
|
|
Thanks Monte, that worked, but now I get this error:
ERRNO: 2
TEXT: unlink(C:\tshirtshop/presentation/templates_c\%%41^412^412F4E3D%%store_front.tpl.php) [function.unlink]: No such file or directory
LOCATION: C:\tshirtshop\libs\smarty\internals\core.write_file.php, line 44, at August 20, 2008, 11:16 pm
Showing backtrace:
unlink("C:\tshirtshop/presentation/templates_c\%%41^412^412F4E3D%%store_...") # line 44, file: C:\tshirtshop\libs\smarty\internals\core.write_file.php
smarty_core_write_file(Array[3], Object: Application) # line 29, file: C:\tshirtshop\libs\smarty\internals\core.write_compiled_resource.php
smarty_core_write_compiled_resource(Array[2], Object: Application) # line 1433, file: C:\tshirtshop\libs\smarty\Smarty.class.php
Smarty._compile_resource("store_front.tpl", "C:\tshirtshop/presentation/templates_c\%%41^412^412F4E3D%%store_...") # line 1256, file: C:\tshirtshop\libs\smarty\Smarty.class.php
Smarty.fetch("store_front.tpl", null, null, true) # line 1108, file: C:\tshirtshop\libs\smarty\Smarty.class.php
Smarty.display("store_front.tpl") # line 16, file: C:\tshirtshop\index.php
It seems to be a problem with Windows XP, how could I correct it please?
Thanks |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
|
Back to top |
|
ivica Smarty Rookie
Joined: 11 Jul 2016 Posts: 6
|
Posted: Mon Jul 11, 2016 3:54 pm Post subject: |
|
|
Not correct:
define('SMARTY_DIR', SITE_ROOT . '/libs/smarty/');
Must be:
define('SMARTY_DIR', SITE_ROOT . '/libs/smarty/libs');
because Smarty.class.php is in:
define('SMARTY_DIR', SITE_ROOT . '/libs/smarty/libs');
Look at in this path
define('SMARTY_DIR', SITE_ROOT . '/libs/smarty/libs');
SMARTY_DIR has puth to Smarty.class.php and not to directory SMARTY.
I have had same problem. |
|
Back to top |
|
ivica Smarty Rookie
Joined: 11 Jul 2016 Posts: 6
|
Posted: Mon Jul 11, 2016 3:56 pm Post subject: Re: Smarty error: unable to read resource: "store_front |
|
|
carlos_duran wrote: | Hi,
I am new to the book and I seem to be having this problem on chapter 3, it appears that here might be something wrong my setup or config.php that reads:
<?php
// SITE ROOT contains the full path to the tshirtshop folder
define('SITE_ROOT', dirname(dirname(__FILE__)));
// Application directories
define('PRESENTATION_DIR', SITE_ROOT . '/presentation/');
define('BUSINESS_DIR', SITE_ROOT . '/business/');
// Settings needed to configure the Smarty template engine
define('SMARTY_DIR', SITE_ROOT . '/libs/smarty/');
define('TEMPLATE_DIR', PRESENTATION_DIR . 'templates');
define('COMPILE_DIR', PRESENTATION_DIR . 'templates_c');
define('CONFIG_DIR', SITE_ROOT . '/include/configs');
?>
Now, the structure of my folders appear to be correct, it looks like this:
C:\tshirtshop>tree
Folder PATH listing
Volume serial number is D402-37C9
C:.
├───images
├───include
│ └───configs
├───libs
│ └───smarty
│ ├───internals
│ └───plugins
├───presentation
│ ├───templates
│ └───templates_c
└───styles
C:\tshirtshop>
I keep getting this error in my browser:
Smarty error: unable to read resource: "store_front.tpl" in C:\tshirtshop\libs\smarty\Smarty.class.php on line 1092
Any ideas would be greatly appreciated.
Thanks,
Carlos |
Correct is:
define('SMARTY_DIR', SITE_ROOT . '/libs/smarty/libs');
Not correct: define('SMARTY_DIR', SITE_ROOT . '/libs/smarty/');
My version phpMyAdmin is from this day 11.07.2016. |
|
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
|
|