Have a connection on a port different than the default and try to make a query on it
$options = array();
$options['driver'] = 'postgresql';
$options['host'] = '192.192.192.192:15432';
$options['user'] = 'myuser';
$options['password'] = 'mypassword';
$options['database'] = 'MYDATABASE';
$options['prefix'] = '';
$dbo = JDatabaseDriver::getInstance( $options );
I expect to work
"Error connecting to PGSQL database."
Looking at the code (https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/database/driver/postgresql.php#L122), looks like is missing the port option, as we can see on http://php.net/manual/es/function.pg-connect.php. Modifying the code and adding port=1532, make it work
As a workaround, I can set options['host'] as $options['host'] = '192.192.192.192 port=15432' and does the trick
Labels |
Added:
?
|
Category | ⇒ | Postgresql |
Status | New | ⇒ | Information Required |
looking at the code, looks like still is
Here are a first basic implementation of the port support please check that out: #19466 I'm open for feedback there on including also some kind of regex like we did for mysql for the port detection.
As we have a PR implementing this request I'm going to close this issue. Thanks!
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-01-26 22:59:51 |
Closed_By | ⇒ | zero-24 |
@irbian is this still an Issue?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18578.