Be more verbose in phpinfo() output

This commit is contained in:
Edin Kadribasic 2006-03-14 10:49:18 +00:00
parent 0bcd459300
commit a8dbb0ded6
2 changed files with 15 additions and 0 deletions

View File

@ -7,6 +7,11 @@ if (PHP_PDO_PGSQL != "no") {
if (CHECK_LIB("libpq.lib", "pdo_pgsql", PHP_PDO_PGSQL) && if (CHECK_LIB("libpq.lib", "pdo_pgsql", PHP_PDO_PGSQL) &&
CHECK_HEADER_ADD_INCLUDE("libpq-fe.h", "CFLAGS_PDO_PGSQL", PHP_PDO_PGSQL + ";" + PHP_PHP_BUILD + "\\include\\pgsql")) { CHECK_HEADER_ADD_INCLUDE("libpq-fe.h", "CFLAGS_PDO_PGSQL", PHP_PDO_PGSQL + ";" + PHP_PHP_BUILD + "\\include\\pgsql")) {
EXTENSION("pdo_pgsql", "pdo_pgsql.c pgsql_driver.c pgsql_statement.c"); EXTENSION("pdo_pgsql", "pdo_pgsql.c pgsql_driver.c pgsql_statement.c");
if (CHECK_HEADER_ADD_INCLUDE("pg_config.h", "CFLAGS_PDO_PGSQL", PHP_PDO_PGSQL + ";" + PHP_PHP_BUILD + "\\include\\pgsql")) {
ADD_FLAG('CFLAGS_PDO_PGSQL', "/D HAVE_PG_CONFIG_H");
}
ADD_FLAG('CFLAGS_PDO_PGSQL', "/I ..\\pecl"); ADD_FLAG('CFLAGS_PDO_PGSQL', "/I ..\\pecl");
AC_DEFINE('HAVE_PDO_PGSQL', 1, 'Have PostgreSQL library'); AC_DEFINE('HAVE_PDO_PGSQL', 1, 'Have PostgreSQL library');
ADD_FLAG('CFLAGS_PDO_PGSQL', "/D HAVE_PQPARAMETERSTATUS=1 /D HAVE_PQPROTOCOLVERSION=1 /D HAVE_PGTRANSACTIONSTATUS=1 /D HAVE_PQUNESCAPEBYTEA=1 /D HAVE_PQRESULTERRORFIELD=1"); ADD_FLAG('CFLAGS_PDO_PGSQL', "/D HAVE_PQPARAMETERSTATUS=1 /D HAVE_PQPROTOCOLVERSION=1 /D HAVE_PGTRANSACTIONSTATUS=1 /D HAVE_PQUNESCAPEBYTEA=1 /D HAVE_PQRESULTERRORFIELD=1");

View File

@ -30,6 +30,10 @@
#include "php_pdo_pgsql.h" #include "php_pdo_pgsql.h"
#include "php_pdo_pgsql_int.h" #include "php_pdo_pgsql_int.h"
#ifdef HAVE_PG_CONFIG_H
#include <pg_config.h>
#endif
/* {{{ pdo_pgsql_functions[] */ /* {{{ pdo_pgsql_functions[] */
zend_function_entry pdo_pgsql_functions[] = { zend_function_entry pdo_pgsql_functions[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
@ -115,6 +119,12 @@ PHP_MINFO_FUNCTION(pdo_pgsql)
{ {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(2, "PDO Driver for PostgreSQL", "enabled"); php_info_print_table_header(2, "PDO Driver for PostgreSQL", "enabled");
#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$ ");
php_info_print_table_end(); php_info_print_table_end();
} }
/* }}} */ /* }}} */