View previous topic :: View next topic |
Author |
Message |
Budda Smarty Regular
Joined: 19 Apr 2003 Posts: 53 Location: Lymm, Cheshire. UK
|
Posted: Wed Aug 13, 2003 12:58 pm Post subject: Turning on Caching stops config load working |
|
|
WHen i enable $smarty->caching = true it seems to cause the templates to fail when loading config files.
The template has lines such as:
Code: | {config_load file="front.index.lang" scope="local"} |
which is now causing the error
Quote: | Warning: Smarty error: unable to read resource: "front.index.lang" in c:\php4\pear\Smarty\Smarty.class.php on line 1156 |
I've just upgraded to Smarty 2.6RC1 but haven't enabled caching before on the templates so not sure if it has been a long standing problem. |
|
Back to top |
|
Budda Smarty Regular
Joined: 19 Apr 2003 Posts: 53 Location: Lymm, Cheshire. UK
|
Posted: Wed Aug 13, 2003 1:24 pm Post subject: |
|
|
Have also noticed that pages which do a simple load config work once, then upon refresh all the config variables are empty and so the page displays blank where the constants should be.
Definetly a bug in 2.6RC1 as i rolled back to Smarty 2.5 and all is fine again. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Aug 13, 2003 1:57 pm Post subject: |
|
|
i cannot reproduce this. config-files and caching works fine with me. when the page is cached there is no need to load any config-files: the config-variables are already printed in the cached page. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Aug 13, 2003 3:43 pm Post subject: |
|
|
Looks like you are on Windows, Budda. I have a similar issue on my w2k box which also eludes me. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Aug 14, 2003 12:34 am Post subject: |
|
|
i see. i also know the offensive line in the source but i really don't know why this only occurs on windows.
i know two workarounds that worked for me to prevent this warning:
- turn $smarty->compile_check=false;
or
- add $smarty->config_dir to your include_path (funky, not?)
unfortunately i don't know how to solve this issue, yet. |
|
Back to top |
|
Budda Smarty Regular
Joined: 19 Apr 2003 Posts: 53 Location: Lymm, Cheshire. UK
|
Posted: Thu Aug 14, 2003 11:20 am Post subject: |
|
|
boots wrote: | Looks like you are on Windows, Budda. I have a similar issue on my w2k box which also eludes me. |
Oops, yeah sorry i forgot to report that I was running the development server on Windows XP. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Aug 14, 2003 4:46 pm Post subject: |
|
|
i committed a fix. check the cvs-version, it should solve your problem.
greetings
messju |
|
Back to top |
|
Budda Smarty Regular
Joined: 19 Apr 2003 Posts: 53 Location: Lymm, Cheshire. UK
|
Posted: Fri Aug 15, 2003 8:23 am Post subject: |
|
|
The firewall at work blocks me from connecting to CVS so I can't get the files from there. What's the individual file(s) I could d/l from the CVS web front end? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Fri Aug 15, 2003 8:45 am Post subject: |
|
|
@budda: AFAIR it was Smarty.class.php and core/core.read_cache_file.php
greetings
messju |
|
Back to top |
|
Budda Smarty Regular
Joined: 19 Apr 2003 Posts: 53 Location: Lymm, Cheshire. UK
|
Posted: Fri Aug 15, 2003 8:54 am Post subject: |
|
|
Cheers messju, seems pretty good - so far - on Windows.
Might even risk it on a production website |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Sat Aug 16, 2003 12:01 am Post subject: |
|
|
Quote: | Might even risk it on a production website |
@budda: just say no! I'm finding that it is working fairly well with my codebase as well, but it is only the first release candidate. It is tempting, though, because I want to start using some of the new features |
|
Back to top |
|
talo Smarty Rookie
Joined: 18 Oct 2005 Posts: 16
|
Posted: Thu Nov 02, 2006 9:56 am Post subject: same sort've error |
|
|
Hi guys,
im getting the following:
"Warning: Smarty error: unable to read template resource: "front/my_diary.tpl" in /usr/local/www/muscletech/includes/Smarty/Smarty.class.php on line 1042"
and it seems that you are talking the same kind of problem.
what settings to i need to change to fix this.
im accessing the site from a windows machine but the actual site is located on a FREEBSD machine.
any ideas would be greatly appreciated.
ciao,
T. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu Nov 02, 2006 4:56 pm Post subject: |
|
|
@talo: no, this is not the same sort of problem and you are bumping a 3-year-old thread. Please repost your issue in the installation forum. You evidently have a problem with your setup and/or permission settings. Did you follow the manual's install instructions? |
|
Back to top |
|
|