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

Fatal error: Class '_smarty_template_buffer' not found
Goto page Previous  1, 2
 
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 -> Installation and Setup
View previous topic :: View next topic  
Author Message
high pressure die casting
Smarty n00b


Joined: 09 Feb 2012
Posts: 1
Location: New York

PostPosted: Thu Feb 09, 2012 1:51 am    Post subject: Reply with quote

Please try harder this one comes up every few days.
Back to top
View user's profile Send private message
xilentxage
Smarty Rookie


Joined: 25 Oct 2010
Posts: 15

PostPosted: Thu Feb 09, 2012 7:23 am    Post subject: Reply with quote

Ok so I reinstalled Smarty, but still the same problem... getting kinda desperate here since I would love to upgrade to 3.x
Back to top
View user's profile Send private message
xilentxage
Smarty Rookie


Joined: 25 Oct 2010
Posts: 15

PostPosted: Thu Feb 09, 2012 8:47 am    Post subject: Reply with quote

Strange thing is there still seems to be some caching going on somewhere.

When I use the example script it works.

Case 1:
When I change to $smarty->setCaching(false) the error appears
When I undo this change the error still appears, only after a few hours it works again.

Case 2:
When I add custom Compile- and cachedir whe error appears
When I undo this change the error still appears, only after a few hours it works again.

I know this sounds like caching at my end like my code-editor, ftp-client or browser is caching the page, but it's not. I have been programming on this system for over 5 years now so I'm pretty sure I have configed it correctly and turned off any caching on my end...

Also I made sure that any cachefiles from smartycache and compile dirs was deleted....
Back to top
View user's profile Send private message
xilentxage
Smarty Rookie


Joined: 25 Oct 2010
Posts: 15

PostPosted: Thu Feb 09, 2012 9:39 am    Post subject: Reply with quote

Another strange case.

I totally cleaned up a test-domain. Only index.php and .htaccess (which sends all requests to index.php) there. Also I installed Smarty (in folder /Smarty-3.1.7)

My index.php:

Code:

require('Smarty-3.1.7/libs/Smarty.class.php');

$smarty = new Smarty;

//$smarty->force_compile = true;
$smarty->debugging = true;
$smarty->caching = true;
$smarty->cache_lifetime = 120;

$smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill",true);
$smarty->assign("FirstName",array("John","Mary","James","Henry"));
$smarty->assign("LastName",array("Doe","Smith","Johnson","Case"));
$smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
     array("I", "J", "K", "L"), array("M", "N", "O", "P")));

$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
     array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));

$smarty->assign("option_values", array("NY","NE","KS","IA","OK","TX"));
$smarty->assign("option_output", array("New York","Nebraska","Kansas","Iowa","Oklahoma","Texas"));
$smarty->assign("option_selected", "NE");

$smarty->display('Smarty-3.1.7/demo/templates/index.tpl');


I copypasted this from your demo (which actually works on my system!) and only changed the paths on first and last line! Now I see:

Code:

Warning: include(smarty_internal_parsetree.php) [function.include]: failed to open stream: No such file or directory in @Ŭ on line 15

Warning: include() [function.include]: Failed opening 'smarty_internal_parsetree.php' for inclusion (include_path='.:/usr/local/lib/php') in @Ŭ on line 15

Fatal error: Class '_smarty_template_buffer' not found in /home/smart/domains/escrowburo.nl/public_html/Smarty-3.1.7/libs/sysplugins/smarty_internal_templateparser.php on line 117


PS I can show you the page and even give out ftp-access on request...
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Thu Feb 09, 2012 3:47 pm    Post subject: Reply with quote

Quote:
Warning: include(smarty_internal_parsetree.php) [function.include]: failed to open stream: No such file or directory in @Ŭ on line 15


This is a hint. Do you really see these garbige chars @Ŭ in the error message?

Try the replace line 15 in smarty_internal_templatecompilerbase.php
with
Code:
include (dirnam(__FILE__) . 'smarty_internal_parsetree.php');


But still strange that you got that error
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Thu Feb 09, 2012 3:54 pm    Post subject: Reply with quote

Did your FTP client (or whatever transfer protocol / client you used) modify the Smarty files regarding charset?
What's the charset PHP is running under? What charset are the files?
Which PHP-Version and OS are we talking about?
Are there any op-code caches (APC, Zend Guard / Optimizer) running?
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
xilentxage
Smarty Rookie


Joined: 25 Oct 2010
Posts: 15

PostPosted: Sat Feb 11, 2012 10:41 am    Post subject: Reply with quote

rodneyrehm wrote:
Did your FTP client (or whatever transfer protocol / client you used) modify the Smarty files regarding charset?
What's the charset PHP is running under? What charset are the files?
Which PHP-Version and OS are we talking about?
Are there any op-code caches (APC, Zend Guard / Optimizer) running?


Thanks for the feedback. I found out APC was running. Which, I guess, explains teh weird caching. I had it turned off and now everything seems to run fine. I have some new errors to tackle, so I might come back to this forum Smile

Is it a problem to have APC running alongside Smarty?
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Sat Feb 11, 2012 10:49 am    Post subject: Reply with quote

xilentxage wrote:
Is it a problem to have APC running alongside Smarty?


Actually not. I'm running APC on all my Smarty-based systems - without problems. If you have set apc.stat=0, your op-code caches will not get updated when something changes on disk. That is the only limitation I currently know of. (And this is something we're trying to tackle in Smarty 3.2).

APC itself is a pile of garbage though. This PECL has given me a number of nightmares and cost us nerves/money to fix certain bugs ourselves. The APC devs are not very active. You can open a bottle of champaign if they merge your bugfix to the base. They don't even bother responding to feature requests: https://bugs.php.net/bug.php?id=59787
_________________
Twitter
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 -> Installation and Setup All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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