Re: Pear DB Tutorial

From: Date: Mon, 16 Apr 2001 00:39:05 +0000
Subject: Re: Pear DB Tutorial
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-233@lists.php.net to get a copy of this message
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. - Markus

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