|
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 |
sprsquish Smarty n00b
Joined: 14 Dec 2004 Posts: 2 Location: Glendora, CA USA
|
Posted: Tue Dec 14, 2004 10:54 am Post subject: write_compiled_include |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Dec 14, 2004 2:52 pm Post subject: |
|
|
Can you give a minimal test case that brings up this error? |
|
Back to top |
|
sprsquish Smarty n00b
Joined: 14 Dec 2004 Posts: 2 Location: Glendora, CA USA
|
Posted: Wed Dec 15, 2004 1:52 am Post subject: |
|
|
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 |
|
|
|
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
|