|
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 |
snlr Smarty Rookie
Joined: 09 Jul 2003 Posts: 8 Location: Berlin
|
Posted: Wed Jul 09, 2003 6:13 pm Post subject: |
|
|
Well, my code sample:
index.php: Code: | $t->display('index.tpl'); |
index.tpl: Code: | {include file="head.tpl"} {include file="foot.tpl"} |
That's when the error already occurs ... head.tpl get's shown 2 times. The more template snippets, the more bazooga.
Headers that my HTTP Live Header plugin shows me:
HTTP/1.x 200 OK
Date: Wed, 09 Jul 2003 18:02:11 GMT
Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_auth_pam/1.0a mod_ruby/0.9.7 Ruby/1.6.6 mod_python/2.7.8 Python/1.5.2 mod_ssl/2.8.12 OpenSSL/0.9.6b DAV/1.0.2 PHP/4.3.0 mod_perl/1.26 mod_throttle/3.1.2
X-Powered-By: PHP/4.3.0
X-Accelerated-By: PHPA/1.3.3r2
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html
Proxy-Connection: close
I'll post when I found out that others found out about it. |
|
Back to top |
|
snlr Smarty Rookie
Joined: 09 Jul 2003 Posts: 8 Location: Berlin
|
Posted: Fri Jul 18, 2003 8:59 pm Post subject: |
|
|
It was PHPA's "fault", in a way. I don't know what he did (yet), but by resetting PHPA or doing some other administrationy thing the admin solved the problem. The templates got only called once, the site looked nice.
FAQ reads: The template goes into an infinite loop when I include included templates that pass local variables -- and answers: This was fixed in 1.3.2 (new global attribute)
Our PHPA was already set to "look *every* time if a script has changed or not, and all the Smarty globals that *I* could see in the manual didn't help. Only changing some date or other setting in PHPA (sorry, I will post a more detailed statement later) would put it straight.
Then I changed my mind about my Smarty setup and cp'd it all into a subdir, because the structure would look nicer on screen. Deleted the old Smarty dir and bang, problem was there again. I slapped myself on the forehead and finally got it fixed anyway, but it really took a while and I'm still suspicious if it's as stable: I changed templates_c and cache and all their subdirs to 777 (when I was allowed) and tried to clear them manually, and put them all into a folder named cache that is also a 777 and located not in the public www dir but in the CGI bin directory (above). Some part of that cache deleting, chmod'ing, and moving dir's around orgy killed the endless loops and semi-templating.
still, Smarty rules
:) |
|
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
|