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

write_compiled_include

 
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 -> Bugs
View previous topic :: View next topic  
Author Message
sprsquish
Smarty n00b


Joined: 14 Dec 2004
Posts: 2
Location: Glendora, CA USA

PostPosted: Tue Dec 14, 2004 10:54 am    Post subject: write_compiled_include Reply with quote

I'm trying to figure out a solution to an issue I'm having with compiled pages. I used example 13-11 from the documentation (http://smarty.php.net/manual/en/caching.cacheable.php) to keep part of my page dynamic while caching the rest. The problem was that it's compiling an error into the code and PHP faults when it tries to run it.

I tracked the problem into internals/core.write_compiled_include.php (line 45).

I dumped ($tokens) and found that token_get_all() is dumping '<?php ' into four entities ('<', '?', 'php', ' '). The array_shift() (line 46) only removes '<' leaving '?php ' behind. After printing to the file the line reads: '?php {code}'

I tried calling array_shift() enough times to remove the extra entities but got a strange stack-underflow error back on line 45 (token_get_all). I haven't been able to figure this out yet. Anyone care to help? E-mail or IM me.

My system is as follows:
Smarty 2.6.6
PHP 5
Apache 2
Mac OS X
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
mohrt
Administrator


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

PostPosted: Tue Dec 14, 2004 2:52 pm    Post subject: Reply with quote

Can you give a minimal test case that brings up this error?
Back to top
View user's profile Send private message Visit poster's website
sprsquish
Smarty n00b


Joined: 14 Dec 2004
Posts: 2
Location: Glendora, CA USA

PostPosted: Wed Dec 15, 2004 1:52 am    Post subject: Reply with quote

Unbelievable...

My sincere apologies, after trying out an example for you it just worked.
I don't understand what happened before, but I'll be spending the next few sleepless nights trying to figure it out.

It seems to have fixed itself after I rebooted.

I'll be back if I can figure out what went wrong.

Sorry again,
--Jeff
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
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 -> Bugs 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