Why doesn't this code work in a model in codeigniter. It works perfectly in "normal" php (with the same variables for the connection).
$con = pg_connect("host=$host dbname=$db user=$user password=$pass")
or die ("Could not connect to server\n");
The following error pops up after some amount of time:
Message: pg_connect(): Unable to connect to PostgreSQL server: could not connect to
server: Connection timed out Is the server running on host "198.xxx.xxx.xxx" and accepting
TCP/IP connections on port 5432?
The answer to this, is as I know, yes