Unification of phpinfo() output for PDO drivers

php.internals

Martin Jansen

18 years ago
The attached patch against HEAD attempts to unify the phpinfo() output of the PDO drivers for Oracle, MySQL, and PostgreSQL by always including the PECL module version string and the $Id$ CVS keyword. (Akin to how it is done for the SQLite driver.) Assuming that you are interested in the changes, I can also provide them for the other PDO drivers. - Martin

Stanislav Malyshev

18 years ago
I think this would be a good idea to add these. Martin Jansen wrote:
> The attached patch against HEAD attempts to unify the phpinfo() output > of the PDO drivers for Oracle, MySQL, and PostgreSQL by always including > the PECL module version string and the $Id$ CVS keyword. (Akin to how > it is done for the SQLite driver.) Assuming that you are interested in > the changes, I can also provide them for the other PDO drivers. > > - Martin >
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

Martin Jansen

18 years ago
On Fri Oct 12, 2007 at 01:5229PM -0700, Stanislav Malyshev wrote:
> Martin Jansen wrote: > >The attached patch against HEAD attempts to unify the phpinfo() output > >of the PDO drivers for Oracle, MySQL, and PostgreSQL by always including > >the PECL module version string and the $Id$ CVS keyword. (Akin to how > >it is done for the SQLite driver.) Assuming that you are interested in > >the changes, I can also provide them for the other PDO drivers. > > I think this would be a good idea to add these.
Attached is an updated patch that covers all drivers in HEAD. - Martin

Stanislav Malyshev

18 years ago
> Attached is an updated patch that covers all drivers in HEAD.
Why this patch says "PECL module version" when the modules are actually not PECL modules? Did you mean "PDO module version"?
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

Marcus Börger

18 years ago
Hello Martin, using the $Revision: $ keyword is enough. Also it looks like you're having a white space issue. marcus Friday, October 12, 2007, 5:54:53 PM, you wrote:
> Index: pdo_mysql/pdo_mysql.c > =================================================================== > RCS file: /repository/php-src/ext/pdo_mysql/pdo_mysql.c,v > retrieving revision 1.17 > diff -u -r1.17 pdo_mysql.c > --- pdo_mysql/pdo_mysql.c 27 Sep 2007 18:28:41 -0000 1.17 > +++ pdo_mysql/pdo_mysql.c 12 Oct 2007 15:49:04 -0000 > @@ -30,6 +30,8 @@ > #include "php_pdo_mysql.h" > #include "php_pdo_mysql_int.h" > > +#define PHP_PDO_MYSQL_MODULE_VERSION "0.9" > + > /* {{{ pdo_mysql_functions[] */ > const zend_function_entry pdo_mysql_functions[] = { > {NULL, NULL, NULL} > @@ -60,7 +62,7 @@ > NULL, > NULL, > PHP_MINFO(pdo_mysql), > - "0.9", > + PHP_PDO_MYSQL_MODULE_VERSION, > STANDARD_MODULE_PROPERTIES > }; > /* }}} */ > @@ -102,6 +104,7 @@ > { > php_info_print_table_start(); > php_info_print_table_header(2, "PDO Driver for MySQL 3.x Client Libraries", "enabled"); > + php_info_print_table_row(2, "PECL Module version", > PHP_PDO_MYSQL_MODULE_VERSION " $Id$"); > php_info_print_table_end(); > } > /* }}} */ > Index: pdo_oci/pdo_oci.c > =================================================================== > RCS file: /repository/php-src/ext/pdo_oci/pdo_oci.c,v > retrieving revision 1.10 > diff -u -r1.10 pdo_oci.c > --- pdo_oci/pdo_oci.c 27 Sep 2007 18:28:41 -0000 1.10 > +++ pdo_oci/pdo_oci.c 12 Oct 2007 15:49:04 -0000 > @@ -30,6 +30,8 @@ > #include "php_pdo_oci.h" > #include "php_pdo_oci_int.h" > > +#define PHP_PDO_OCI_MODULE_VERSION "0.9" > + > /* {{{ pdo_oci_functions[] */ > const zend_function_entry pdo_oci_functions[] = { > {NULL, NULL, NULL} > @@ -59,7 +61,7 @@ > NULL, > NULL, > PHP_MINFO(pdo_oci), > - "0.9", > + PHP_PDO_OCI_MODULE_VERSION, > STANDARD_MODULE_PROPERTIES > }; > /* }}} */ > @@ -119,6 +121,7 @@ > { > php_info_print_table_start(); > php_info_print_table_header(2, "PDO Driver for OCI 8 and later", "enabled"); > + php_info_print_table_row(2, "PECL Module version", PHP_PDO_OCI_MODULE_VERSION " $Id$"); > php_info_print_table_end(); > } > /* }}} */ > Index: pdo_pgsql/pdo_pgsql.c > =================================================================== > RCS file: /repository/php-src/ext/pdo_pgsql/pdo_pgsql.c,v > retrieving revision 1.16 > diff -u -r1.16 pdo_pgsql.c > --- pdo_pgsql/pdo_pgsql.c 27 Sep 2007 18:28:41 -0000 1.16 > +++ pdo_pgsql/pdo_pgsql.c 12 Oct 2007 15:49:04 -0000 > @@ -30,6 +30,8 @@ > #include "php_pdo_pgsql.h" > #include "php_pdo_pgsql_int.h" > > +#define PHP_PDO_PGSQL_MODULE_VERSION "0.9" > + > #ifdef HAVE_PG_CONFIG_H > #undef PACKAGE_BUGREPORT > #undef PACKAGE_NAME > @@ -70,7 +72,7 @@ > PHP_RINIT(pdo_pgsql), > PHP_RSHUTDOWN(pdo_pgsql), > PHP_MINFO(pdo_pgsql), > - "0.9", > + PHP_PDO_PGSQL_MODULE_VERSION, > STANDARD_MODULE_PROPERTIES > }; > /* }}} */ > @@ -127,8 +129,7 @@ > #ifdef HAVE_PG_CONFIG_H > php_info_print_table_row(2, "PostgreSQL(libpq) Version", PG_VERSION); > #endif > - php_info_print_table_row(2, "Module version", pdo_pgsql_module_entry.version); > - php_info_print_table_row(2, "Revision", " $Id: pdo_pgsql.c,v 1.16 2007/09/27 18:28:41 dmitry > Exp $ "); > + php_info_print_table_row(2, "PECL Module version", > PHP_PDO_PGSQL_MODULE_VERSION " $Id$"); > > php_info_print_table_end(); > }
Best regards, Marcus