[eluser]Vadtec[/eluser]
Debian: Linux charon 2.6.26-1-amd64 #1 SMP Fri Mar 13 17:46:45 UTC 2009 x86_64 GNU/Linux
CI version: 1.7.2
PHP Version 5.2.12-0.dotdeb.1
PDO drivers: mysql, pgsql, sqlite, sqlite2
PDO Driver for PostgreSQL: enabled
PostgreSQL(libpq) Version: 8.3.9
Module version: 1.0.2
Revision: $Id: pdo_pgsql.c 289287 2009-10-07 17:40:16Z mbeccati $
PostgreSQL Support: enabled
PostgreSQL(libpq) Version: 8.3.9
Multibyte character support: enabled
SSL support: enabled
Active Persistent Links: 0
Active Links: 0
Directive Local Value Master Value
pgsql.allow_persistent On On
pgsql.auto_reset_persistent Off Off
pgsql.ignore_notice Off Off
pgsql.log_notice Off Off
pgsql.max_links Unlimited Unlimited
pgsql.max_persistent Unlimited Unlimited
I had a website that was running as of Feb this year. However, when I went back to start working on it again, I kept getting:
"A Database Error Occurred
Unable to connect to your database server using the provided settings."
After trying everything under the sun, I uploaded a fresh copy of CI all on its own to the web server. I was able to get the default welcome page to display nicely. However, as soon as I plugged in the database information and auto loaded the database module, CI errored out again. I then tried manually loading the database module in the welcome.php controller, and received the same results.
Wondering if the DB driver was even trying to connect to postgre (which I can verify is working via both CLI and phppgadmin), I fired up tcpdump. Much to my surprise, neither the web server nor the database server are seeing any packets that would be bound for postgre. I know it's not a fire walling issue on either box, and I am capturing all packets for the assigned IP(s), not just certain ports. I have tried capturing on the ports as well, and still see no packets.
For the sake of security, I have removed sensetive sections of the following config:
$db['default']['hostname'] = "<I use the IP here>";
$db['default']['port'] = 5432;
$db['default']['username'] = "someuser";
$db['default']['password'] = "thatpass";
$db['default']['database'] = "thisdatabase";
$db['default']['dbdriver'] = "postgre";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
As I said, I can verify that the log in information for the database *is* correct and works properly. I have tried setting pconnect to both true and false.
No matter what I have tried, I see *zero* packets even attempt to be sent. I have verified that apache is working, as is php. The drivers are loaded and accessible (as you can see from the paste above).
I am at a loss. I suspect that when the box was upgraded something broke, but CI does little to actually help figure out what is broken. Any help is greatly appreciated.
- Vadtec