From f64b86a8e34833c5f299454faac15225c5ff25d0 Mon Sep 17 00:00:00 2001 From: kkalev Date: Sat, 11 Jan 2003 18:45:32 +0000 Subject: [PATCH] In debug, output the sql queries in italic. Refer to enabling debugging in the FAQ --- Changelog | 5 +++-- FAQ | 2 ++ lib/sql/drivers/mysql/functions.php3 | 2 +- lib/sql/drivers/pg/functions.php3 | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 275255a..19d6715 100644 --- a/Changelog +++ b/Changelog @@ -24,9 +24,10 @@ Ver 1.62: * In log_badlogins create a separate sql input file for each sql server and append sql commands to it. If the sql command succeeds we delete the corresponding input file. That way if an sql server is down we store the accounting info in the input file and then send it all when it comes back up. -* Add a directive sql_debug. Add debuging statements in the sql library -* Add a directive ldap_debug. Add debuging statements in the ldap library +* Add a directive sql_debug. Add debugging statements in the sql library +* Add a directive ldap_debug. Add debugging statements in the ldap library * Add debug statements in the pg driver +* In debug, output the sql queries in italic. Refer to enabling debugging in the FAQ Ver 1.61: * Add a string encoder for greek * If general_decode_normal_attributes is set then encode attributes in lib/ldap/change_info. In the near future diff --git a/FAQ b/FAQ index 3864b0c..8a729e3 100644 --- a/FAQ +++ b/FAQ @@ -64,5 +64,7 @@ Check that the register_globals in php.ini is set to on. As of PHP 4.2.0 this is versions of dialup_admin will work even if register_globals is set to off if the php version is > 4.1.0 (Thanks to Evren Yurtesen for the suggestion). +In latest versions you can also enable sql debug (sql_debug: true) and ldap debug (ldap_debug: true) + -- kkalev diff --git a/lib/sql/drivers/mysql/functions.php3 b/lib/sql/drivers/mysql/functions.php3 index e558f2c..78fe0a5 100644 --- a/lib/sql/drivers/mysql/functions.php3 +++ b/lib/sql/drivers/mysql/functions.php3 @@ -28,7 +28,7 @@ function da_sql_close($link,$config) function da_sql_query($link,$config,$query) { if ($config[sql_debug] == 'true') - print "DEBUG(SQL,MYSQL DRIVER): Query: $query
\n"; + print "DEBUG(SQL,MYSQL DRIVER): Query: $query
\n"; return @mysql_db_query($config[sql_database],$query,$link); } diff --git a/lib/sql/drivers/pg/functions.php3 b/lib/sql/drivers/pg/functions.php3 index d0f885a..4c5a10b 100644 --- a/lib/sql/drivers/pg/functions.php3 +++ b/lib/sql/drivers/pg/functions.php3 @@ -30,7 +30,7 @@ function da_sql_close($link,$config) function da_sql_query($link,$config,$query) { if ($config[sql_debug] == 'true') - print "DEBUG(SQL,PG DRIVER): Query: $query
\n"; + print "DEBUG(SQL,PG DRIVER): Query: $query
\n"; return @pg_exec($link,$query); } -- 2.39.5