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

Segmentation fault with Smarty, PHP5 and a count function

 
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
stalker
Smarty Rookie


Joined: 28 Aug 2003
Posts: 15

PostPosted: Wed Sep 29, 2004 10:09 pm    Post subject: Segmentation fault with Smarty, PHP5 and a count function Reply with quote

Hello guys, I've been using smarty on my website for ages now and never had this kind of problems until we switched to PHP5 on the server.

The rest of my page works just fine except for the templates that use a counter function - they just die without delivering any output or error.
The apache error log shows a segfault everytime those pages are called.

Code:

<%section name=row loop=$PICTURES%>
<%counter assign=REPETITION%>
   <li>some text</li>            
<%/section%>


Your help will be very much appreciated as I have absolutely no clue what can cause this. I tried debuggig it, but no matter how I change function.counter.php it still segfaults. It seems the error occurs before the counter function itself!
Back to top
View user's profile Send private message
stalker
Smarty Rookie


Joined: 28 Aug 2003
Posts: 15

PostPosted: Wed Sep 29, 2004 10:36 pm    Post subject: Reply with quote

Never mind, I updated to the latest smarty version and it works fine now.

I still would like to know what causes the segmentation fault?
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Sep 30, 2004 12:51 am    Post subject: Reply with quote

Who knows. Especially impossible to tell without things like version numbers, os types and versions, etc. PHP5 is still a young horse, so I'd say to expect bucking. Smile
Back to top
View user's profile Send private message
stalker
Smarty Rookie


Joined: 28 Aug 2003
Posts: 15

PostPosted: Thu Sep 30, 2004 7:51 am    Post subject: Reply with quote

Hehe, yeah - actually that was my problem. For some reason I could not find the version number in the smarty class. As for the rest: Gentoo Linux running the latest PHP and Apache2 builds. I must admit the old smarty class was in use for over 2 years now...
Back to top
View user's profile Send private message
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