Debugging a PHP to PostgreSQL Connection -


what best way see whats going on php connection postgresql database log?

i've edited "postgresql.conf" file include debugging level 5 information (debug5) (maybe not needed??):

client_min_messages = debug5 log_min_messages = debug5 log_min_error_statement = debug5 

however, ./pg_log/postgresql-*.log file doesn't seem include helpful command or failed login information php??

./pg_log/postgresql-*.log:

debug:  pg_toast_2619: vac: 0 (threshold 52), anl: 0 (threshold 51) debug:  committransaction debug:  name: unnamed; blockstate:       started; state: inprogr, xid/subid/cid: 0/1/0, nestlvl: 1, children:  debug:  shmem_exit(0): 8 callbacks make debug:  proc_exit(0): 2 callbacks make debug:  exit(0) debug:  shmem_exit(-1): 0 callbacks make debug:  proc_exit(-1): 0 callbacks make debug:  reaping dead processes debug:  server process (pid 20524) exited exit code 0 

php:

<?php                                                                                           // connecting, selecting database                                                               $dbconn = pg_connect("host=localhost dbname=orion user=username password=password")        or die('could not connect: ' . pg_last_error());                                             // performing sql query                                                                         $query = 'select * main';                                                                  $result = pg_query($query) or die('query failed: ' . pg_last_error());                           // printing results in html                                                                     echo "<table>\n";                                                                               while ($line = pg_fetch_array($result, null, pgsql_assoc)) {                                        echo "\t<tr>\n";                                                                                foreach ($line $col_value) {                                                                     echo "\t\t<td>$col_value</td>\n";                                                           }                                                                                               echo "\t</tr>\n";                                                                           }                                                                                               echo "</table>\n";                                                                               // free resultset                                                                               pg_free_result($result);                                                                         // closing connection                                                                           pg_close($dbconn);                                                                              ?>        

is there anyway see whats going on php connection postgresql in detail? other log files in ./pg_clog/ "0000" , binary? i'm using default values else in postgresql.conf file.


Comments