-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
connection to Postgresql fail to translate host name #7399
Comments
cc @simonwelsh |
Looks like this maybe an environment configuration issue, I'm going to close this and open an issue with Travis CI. I'll reopen if there is no environment configuration issues |
Reopening since I was unable to replicate the issue with similar environment with php 5.6. Seems to be only happening in HHVM. |
@photodude are you able to get the raw DSN being used? The code you've pasted is for |
Yes @simonwelsh I believe this is the raw DSN from the phpunit xml file <const name="JTEST_DATABASE_POSTGRESQL_DSN" value="host=localhost;port=5432;dbname=joomla_ut;user=postgres;pass=" /> it's parsed by this section of the phpunit setup https://github.com/joomla/joomla-cms/blob/staging/tests/unit/core/case/database/postgresql.php#L35-L107 |
Maybe the error is from the PDO pgsql portion of phpUnit which is used to set up the tests $pdo = new PDO($dsn, self::$_options['user'], self::$_options['password']);
return $this->createDefaultDBConnection($pdo, self::$_options['database']); |
Ah, it's using spaces instead of semicolons as delimiters. Must've missed that when I switched from a custom DSN parser to the one already in HHVM. Should be easy enough to fix. |
We look forward to a patch to fix the DSN parser to allow spaces. |
pdo_pgsql allows seperatoring values with a space as well as a semicolon. Add support to the DSN parser for multiple seperator characters and set pdo_pgsql to allow ';' and ' '. pdo_mysql, currently the only other connector using this parser, does not change. Fixes facebook#7399.
Thanks @simonwelsh @Orvid @aorenste |
Summary: pdo_pgsql allows seperatoring values with a space as well as a semicolon. Add support to the DSN parser for multiple seperator characters and set pdo_pgsql to allow ';' and ' '. pdo_mysql, currently the only other connector using this parser, does not change. Fixes #7399. Closes #7409 Github Author: Simon Welsh <simon@simon.geek.nz> Github PR Sync: {sync, type="child", parent="github", parentrepo="facebook/hhvm", parentprnum="7409", parentprfbid="341168139567521"} Test Plan: Imported from GitHub, without a `Test Plan:` line. Reviewers: svcscm Reviewed By: svcscm Subscribers: svcscm, hphp-diffs@, cdykes, michaelofarrell Differential Revision: https://phabricator.intern.facebook.com/D3995081 Signature: t1:3995081:1476657792:9b373a7d999f35880998ebd46ef1f8d1850a9234
HHVM Version
3.16.0-dev (hhvm-nightly)
Standalone code, or other way to reproduce the problem
Joomla Postgresql driver (below is a snip from the driver that hopefully would represent Standalone code)
Expected result
connection to Postgresql without PDOExceptions, previously worked in 3.15 and with the old 3rdparty pgsql module
Actual result
PDOException: [112]: could not translate host name "localhost port=5432 dbname=joomla_ut" to address: Name or service not known
The text was updated successfully, but these errors were encountered: