Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Newbie: Smarty error: unable to read resource:

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
chrisv2
Smarty n00b


Joined: 05 Sep 2013
Posts: 3

PostPosted: Thu Sep 05, 2013 1:39 pm    Post subject: Newbie: Smarty error: unable to read resource: Reply with quote

I'm using a commercial shopping cart system (Pinnacle Cart), which uses Smarty at its heart.

I added my own HTML template, in the standard skin/template directory for the cart, and I also added the name of the template in an array structure I found in the cart's index.php code.

It works great, my custom page is served up and everything is wonderful.

However, I was checking the error log on my server and I see that someone out there trying to access my page is getting this:

Code:
[04-Sep-2013 09:13:25] PHP Warning:  Smarty error: unable to read resource: "templates/pages/site/contact-form.html" in /home/foo/public_html/store/content/vendors/smarty/Smarty.class.php on line 1093


So next I did two things. First I accessed that page from one of those online services that loads your website from clients located in various countries. No problems, the page loads fine and no errors. Next, I did the same from a service that loads your site from over 100 different browser/OS combinations. Again, no problems and no new entries in error_log.

I know I have not given you much to go on, but even a theory as to why someone out there is hitting this error?

Thanks!
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu Sep 05, 2013 3:54 pm    Post subject: Reply with quote

it could simply be a race condition where one browser is trying to load a file that another one had just removed/replaced. are they using the latest smarty build for 2.6? that is the first thing I'd be sure of, in case you are dealing with some older code.
Back to top
View user's profile Send private message Visit poster's website
chrisv2
Smarty n00b


Joined: 05 Sep 2013
Posts: 3

PostPosted: Thu Sep 05, 2013 6:06 pm    Post subject: Reply with quote

ok thanks - is there a way I can check the version myself or do I have to ask them?
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu Sep 05, 2013 9:22 pm    Post subject: Reply with quote

look at the smarty class file and check the version number
Back to top
View user's profile Send private message Visit poster's website
chrisv2
Smarty n00b


Joined: 05 Sep 2013
Posts: 3

PostPosted: Thu Sep 05, 2013 10:58 pm    Post subject: Reply with quote

Here is what I found. Is this way outdated?

@package Smarty
* @version 2.6.26
*/

/* $Id: Smarty.class.php 3163 2009-06-17
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Fri Sep 06, 2013 1:32 pm    Post subject: Reply with quote

2.6.27 is the most recent, but I doubt that would affect your issue. So your issue is probably an environmental race condition. These can be difficult to track down. If you see that error only very occasionally it might be negligible, such as it only happens when templates are first compiled. If your log file is filling up with these messages, then something else must be addressed.

I have seen similar errors when template files are read/write over NFS or other latency-prone file connections. It can be a lot of things.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP