[TYPO3-dev] Problem with debugging

Klaus Muth news2004 at hampft.de
Mon Nov 26 10:58:25 CET 2007


Malte Jansen wrote:

> Hi,
> 
> since there is no frame I the output of echo or print_r() is writing
> behind the layer in a tceform. So it's very difficult to get it.
> 
> Is there somewhere a function were the echo/print_r can be redirct or
> something simular.
> 
> For the tceform on the getMainFields
> this works fine:
> ob_start();
> echo '<div>';
> print_r($data);
> echo '</div>';
> $temp = ob_get_contents();
> ob_end_clean();
> return $temp.$output;
> 
> but it does not work at every place...
> 
> Any suggestion?
Try some combination of error_log() and print_r(). BTW: print_r() has got a
second parameter since 4.3, if you set it to true, it returns a string
instead of printing it so STDOUT.

So try error_log(print_r($data, true), 0); 
You may find your data in /var/log/apache/error.log

klaus
-- 
Klaus Muth               HAGOSVerbunddeutscherKachelofen-undLuftheizungs
Germany                  bauerbetriebeeGSitz:StuttgartRechtsf.:Genossens
Industriestr. 62         chaftReg.ger.:StuttgartGnR77Vst:GuidoEichel,Ral
70565 Stuttgart          fTiggesARVors.:ThomasMüllerUStIDNr.:DE147799748




More information about the TYPO3-dev mailing list