View previous topic :: View next topic |
Author |
Message |
demental Smarty Rookie
Joined: 11 Jan 2006 Posts: 20 Location: Lost in the French deeeeep countryside
|
Posted: Fri Jun 01, 2007 6:58 pm Post subject: >php 5.2.2, smarty->display() fails silently... |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Jun 01, 2007 8:27 pm Post subject: |
|
|
Did you clear all the compiled and cache files after the upgrade? I'd try that first. |
|
Back to top |
|
demental Smarty Rookie
Joined: 11 Jan 2006 Posts: 20 Location: Lost in the French deeeeep countryside
|
Posted: Fri Jun 01, 2007 8:55 pm Post subject: |
|
|
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 |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Sat Jun 02, 2007 9:30 am Post subject: |
|
|
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 |
|
demental Smarty Rookie
Joined: 11 Jan 2006 Posts: 20 Location: Lost in the French deeeeep countryside
|
Posted: Sun Jun 03, 2007 6:06 am Post subject: |
|
|
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 |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Sun Jun 03, 2007 7:36 am Post subject: |
|
|
Perplexing. Maybe show a trace from xdebug? |
|
Back to top |
|
Hielke Hoeve Smarty Elite
Joined: 06 Jan 2006 Posts: 406 Location: Netherlands
|
Posted: Mon Jun 04, 2007 9:18 pm Post subject: |
|
|
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 |
|
demental Smarty Rookie
Joined: 11 Jan 2006 Posts: 20 Location: Lost in the French deeeeep countryside
|
Posted: Tue Jun 05, 2007 7:52 am Post subject: |
|
|
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 |
|
|