Re: Pear DB Tutorial
| From: | (Stig Sæther Bakken) | Date: | Sun, 15 Apr 2001 22:20:44 +0000 |
| Subject: | Re: Pear DB Tutorial | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-232@lists.php.net to get a copy of this message | ||
["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
--
Stig Sæther Bakken <ssb@fast.no>
Fast Search & Transfer ASA, Trondheim, Norway