# Unification of phpinfo() output for PDO drivers

- Thread: https://externals.io/message/32739
- Original archive: https://news-web.php.net/php.internals/32739
- Started by Martin Jansen on 2007-10-12T15:54:53+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #32739 — Martin Jansen — 2007-10-12T15:54:53+00:00

URL: https://externals.io/message/32739#32739

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

---

## #32741 — Stanislav Malyshev — 2007-10-12T20:52:29+00:00

URL: https://externals.io/message/32739#32741 · In reply to: #32739

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

---

## #32743 — Martin Jansen — 2007-10-13T09:57:32+00:00

URL: https://externals.io/message/32739#32743 · In reply to: #32741

> Martin Jansen wrote:
> > […]
>
> I think this would be a good idea to add these.

Attached is an updated patch that covers all drivers in HEAD.

- Martin

---

## #32766 — Marcus Boerger — 2007-10-14T21:14:44+00:00

URL: https://externals.io/message/32739#32766 · In reply to: #32739

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

---

## #33069 — Stanislav Malyshev — 2007-11-09T19:43:14+00:00

URL: https://externals.io/message/32739#33069 · In reply to: #32743

> 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
