[PATCH] Ingres error reporting functions

php.internals

Croker, Grant

21 years ago
Hi, I would like to submit the following patch to PHP: http://www.ingres.co.uk/php/head/ingres_error_reporting.diff It includes 3 new functions for reporting errors; ingres_error(), ingres_error_text() and ingres_error_sqlstate(). Also included is the ability to suppress E_WARNING messages that happen when a database error is detected. This requires the following to be added to php.ini under the section titled "[Ingres II]": ; Report database warnings or not ingres.report_db_warnings = 0 When trying to test this functionality on Linux I ran across a problem/difference in the way Windows and UNIX/Linux based autoconf generates the Makefile. It would appear that with UNIX it expects its configuration files be located in a directory name equivalent to the first parameter to PHP_NEW_EXTENSION in config.m4. For most extensions I guess this not a problem since the directory and extension name match up. For the Ingres extension they don't. After the fix for bug 32333/32359 the extension name changed from ingres_ii to ingres to allow the extension to build on Windows. The fix was needed as the Windows build process uses the extname in 'ARG_WITH(extname,...)' to work out what the extension is called. This had the unforeseen affect of breaking the UNIX/Linux configure process. I guess extension names and their relative 'ext' dir should match? Can the directory ext/ingres_ii be moved to ext/ingres? Regards, grant
-- Grant Croker Software Engineer, Ingres Development mailto:grant.croker at ca.com

Lukas Smith

21 years ago
Grant Croker wrote:
> I would like to submit the following patch to PHP: > http://www.ingres.co.uk/php/head/ingres_error_reporting.diff > > It includes 3 new functions for reporting errors; ingres_error(), > ingres_error_text() and ingres_error_sqlstate(). Also included is the > ability to suppress E_WARNING messages that happen when a database error > is detected. This requires the following to be added to php.ini under > the section titled "[Ingres II]":
I know its too late to fix this in the current database extensions (who all follow either the native, the mysql ext or some random naming the given developer came up with), but you might want to atleast try and follow an existing database extension with the function naming. I guess ext/mysql or mysqli might be a good rolemodel just because its used alot. regards, Lukas