Re: Pear DB Tutorial

From: Date: Mon, 16 Apr 2001 07:41:22 +0000
Subject: Re: Pear DB Tutorial
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-234@lists.php.net to get a copy of this message
[Markus Fischer <mfischer@josefine.ben.tuwien.ac.at>] > On Sun, Apr 15, 2001 at 06:20:44PM -0400, Stig Sæther Bakken wrote : > > ["Tomas V.V.Cox" <cox@idecnet.com>] > > > Luc Saint-Elie wrote: > > > > > > > > And another thing > > > > die ($db->getMessage()) > > > > throws : Warning: ini_set() has been disabled for security reasons. in > > > > mysql.php on line 105 > > > > > > > > > > Houston, we have a problem :) > > > > > > Stig, perhaps maybe many ISPs don't accept ini_set. What do you think > > > about change ini_* with ob_*? > > > > > > ob_start(); > > > $conn = mysql_connect(..); > > > $error = ob_get_contents(); > > > ob_end_clean(); > > > if (!$conn) > > > ... > > > > It's not foolproof, if you've configured PHP to send errors elsewhere, > > or to not display warnings, you won't get anything. But it's better > > than nothing. > > > > - Stig > > Does this also apply to 'set_error_handler' and later > restoring with 'restore_error_handler' ? Thats the way I > initially suggested it. Yeah, that's another variation that will cause problems. :-P - Stig -- Stig Sæther Bakken <ssb@fast.no> Fast Search & Transfer ASA, Trondheim, Norway

« previous php.pear.dev (#234) next »