php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69968 Connectivity Issue
Submitted: 2015-06-30 13:14 UTC Modified: 2015-07-01 05:49 UTC
From: vijaybabu dot r at hp dot com Assigned:
Status: Wont fix Package: PostgreSQL related
PHP Version: 5.4.42 OS: HP UX
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vijaybabu dot r at hp dot com
New email:
PHP Version: OS:

 

 [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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-07-01 05:47 UTC] yohgaki@php.net
-Status: Open +Status: Wont fix
 [2015-07-01 05:47 UTC] yohgaki@php.net
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
 [2015-07-01 05:49 UTC] yohgaki@php.net
BTW, PostgreSQL module is simple libpq wrapper. Make sure you build PHP with the correct (i.e. PostgreSQL 9.4's) libpq.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu May 13 10:01:23 2021 UTC