Re: PostgreSQL patch

From: Date: Tue, 10 Jul 2001 09:57:11 +0000
Subject: Re: PostgreSQL patch
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-611@lists.php.net to get a copy of this message
Markus Fischer wrote: > > On Mon, Jul 09, 2001 at 05:29:18PM +0200, Tomas V.V.Cox wrote : > > 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. > > Shouldn't this be changed in the appropriate extension to return > the right errors ? It depends on the backend. PostgreSQL native error functions don't store connection error, this is why we need this kind of things. > I remember this was corrected in the mysql extension finally. > [ Added connection error support to mysql_error() and mysql_errno() (Jason) ] > I added it some time ago, but remember that this feature is very new so still need to preserve the old method for old PHP versions. Tomas V.V.Cox

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