|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-06-30 13:14 UTC] vijaybabu dot r at hp dot com
Description: ------------ I have installed php 5.2 & 5.4 and postgres 9.4 in same server HP UX 11.31 ia64. Whenever i tried to connect postgres database, am getting below message in browser Unable to connect to PostgreSQL server: could not get socket error status: Error 0 in /opt/hpws22/apache/htdocs/one.php on line 3 And in postgres log file, am getting below message Incomplete startup packet I have tried to connect the same postgres with Perl and psql. Its all working fine with same parameters. But from PHP i couldnt connect. Test script: --------------- <?php $options = " host='localhost' port='5432' user='vijay' password='abcd123' dbname='test456' "; pg_connect($options); //i tried with ip address, host name, 127.0.0.1 & socket(/tmp/) ?> Actual result: -------------- Unable to connect to PostgreSQL server: could not get socket error status: Error 0 in /opt/hpws22/apache/htdocs/one.php on line 3 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 04:00:02 2025 UTC |
Sorry, but I cannot reproduce the issue on 5.6... Support for 5.2/5.4 is already finished. I have to close this. If you find issue on 5.6, please re-open. php > var_dump(pg_connect("host=localhost port=5432 user=yohgaki")); resource(1) of type (pgsql link) php > var_dump(pg_connect("host='localhost' port=5432 user=yohgaki")); resource(2) of type (pgsql link) php > var_dump(pg_connect("host='localhost' port='5432' user=yohgaki")); resource(3) of type (pgsql link) php > var_dump(pg_connect("host='localhost' port='5432' user='yohgaki'")); resource(4) of type (pgsql link) php > var_dump(pg_connect(" host='localhost' port='5432' user='yohgaki'")); resource(5) of type (pgsql link) php > var_dump(pg_connect(" host='127.0.0.1' port='5432' user='yohgaki'")); resource(6) of type (pgsql link) php > var_dump(pg_connect(" host='127.0.0.1' user='yohgaki'")); resource(7) of type (pgsql link) php > var_dump(pg_connect(" host='127.0.0.1' port='5432' user='yohgaki' ")); resource(8) of type (pgsql link) php > echo phpversion(); 5.6.10