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

>php 5.2.2, smarty->display() fails silently...

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


Joined: 11 Jan 2006
Posts: 20
Location: Lost in the French deeeeep countryside

PostPosted: Fri Jun 01, 2007 6:58 pm    Post subject: >php 5.2.2, smarty->display() fails silently... Reply with quote

since my web host upgraded fro php 5.1.6 to php 5.2.2 $smarty->display($template,$cacheID) fails while displaying the result, in the middle of a {foreach...} loop
I've tried many ways to show up an error message (even making my own error_handler in case come output buffer would hide a fatal error), no way...

Finally I replaced my line :
$smarty->display($template,$cacheID) by :
echo $smarty->fetch($template,$cacheID);

And everything went back fine.
Any idea ?
Back to top
View user's profile Send private message Visit poster's website
mohrt
Administrator


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

PostPosted: Fri Jun 01, 2007 8:27 pm    Post subject: Reply with quote

Did you clear all the compiled and cache files after the upgrade? I'd try that first.
Back to top
View user's profile Send private message Visit poster's website
demental
Smarty Rookie


Joined: 11 Jan 2006
Posts: 20
Location: Lost in the French deeeeep countryside

PostPosted: Fri Jun 01, 2007 8:55 pm    Post subject: Reply with quote

Yes I did, both cache and compile cleared.
I checked too that I had the latest release.
I really don't know how to find the way to, firstable find what's going wrong, and then fix it.
Anyway for now the echo does its job.
Back to top
View user's profile Send private message Visit poster's website
boots
Administrator


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

PostPosted: Sat Jun 02, 2007 9:30 am    Post subject: Reply with quote

Are you doing any manual output buffering? IIR, PHP only fails silently on unusual things like timeouts and out of memory -- but neither seem to be the case here. I assume you already tested with error reporting at E_ALL, yes?
Back to top
View user's profile Send private message
demental
Smarty Rookie


Joined: 11 Jan 2006
Posts: 20
Location: Lost in the French deeeeep countryside

PostPosted: Sun Jun 03, 2007 6:06 am    Post subject: Reply with quote

I've tried E_ALL as error_reporting, and set as well display_errors to 1.
I've set_error_handler with my own handler with some ob_clean, just in case I had forgotten somewhere that I was using some output buffering.

This would drive me crazy if I had not found the workaround.
Back to top
View user's profile Send private message Visit poster's website
boots
Administrator


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

PostPosted: Sun Jun 03, 2007 7:36 am    Post subject: Reply with quote

Perplexing. Maybe show a trace from xdebug?
Back to top
View user's profile Send private message
Hielke Hoeve
Smarty Elite


Joined: 06 Jan 2006
Posts: 406
Location: Netherlands

PostPosted: Mon Jun 04, 2007 9:18 pm    Post subject: Reply with quote

Can you look into your webserver logs (apache at /varlog/apache). I had the same some time ago and my error was in the logs instead of in the html.
_________________
Debug XHTML Compliance
SmartyPaginate
Smarty License Questions
---
(About Unix) The learning curve is full of aha! moments, such as that glorious day that the full beauty of grep and, later, find is revealed in all its majesty. --- Robert Uhl <ruhl@4dv.net>
Back to top
View user's profile Send private message
demental
Smarty Rookie


Joined: 11 Jan 2006
Posts: 20
Location: Lost in the French deeeeep countryside

PostPosted: Tue Jun 05, 2007 7:52 am    Post subject: Reply with quote

Hi again.
I've not seen any abnormal information in my apache log, and would like to reproduce the bug locally but my local PHP version is 5.1.4, as I use MAMP which has not released a 5.2.2 package. Also I'm on a shared host where xdebug is not installed. I'll give you some news when I upgrade my local server.
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
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