Re: PostgreSQL patch
| From: | Tomas V.V.Cox | Date: | Mon, 09 Jul 2001 15:29:18 +0000 |
| Subject: | Re: PostgreSQL patch | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-607@lists.php.net to get a copy of this message | ||
On Monday 09 July 2001 13:32, Arjan Wekking wrote:
> If I am not mistaken, you could use $php_errormsg, which contains te
> last php error message, generated by the track_errors configuration
> directive. Unfortunately, track_errors is off by default, but it can
> be set with ini_set('track_errors','1'). It would be wise to restore
> the value to it's original php.ini settings after you have catched
> the error with ini_restore('track_errors'). I think this is a more
> elegant way to catch errors than using output buffering :]
>
In my opinion ob_* is better solution that ini_set(), at least more
general. We had problems adding ini_set to the mysql extension because
most ISPs (all?) disables the ability to change php.ini values at
runtime. Output buffering comes installed and doesn't disturb nothing.
In the other hand I highly recomend that track_errors should be changed
to true as default installation. We use it in many classes to catch
errors.
Tomas V.V.Cox