|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16466 problem with pg_host()
Submitted: 2002-04-06 14:18 UTC Modified: 2002-07-07 19:57 UTC
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ruivilela at hotmail dot com Assigned:
Status: Not a bug Package: PostgreSQL related
PHP Version: 4.1.1 OS: Win2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
9 + 30 = ?
Subscribe to this entry?

 [2002-04-06 14:18 UTC] ruivilela at hotmail dot com
This script give the same error on both of my web servers (iis,apache)


$db_handle = pg_connect("dbname=ensite2001 hostaddr= user=rvilela password=xxxxxx");
if ($db_handle)
	echo "Connection attempt succeeded.<br>\n";
	echo "Connection attempt failed.<br>\n";

echo "<h1>Connection Information</h1>";
echo "Database name: " . pg_dbname($db_handle) . "<br>\n";
echo "Hostname: " . pg_host($db_handle) . "<br>\n"; //using this function crash php.exe
echo "Options: " . pg_options($db_handle) . "<br>\n";
echo "Port: " . pg_port($db_handle) . "<br>\n";
echo "TTY name: " . pg_tty($db_handle) . "<br>\n";



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-06 19:12 UTC]
I don't see any error on my linux. It may be Windows thing.
Could you paste error message? (when you report, could you paste error, since developer may not see the same error)
 [2002-04-07 06:24 UTC] ruivilela at hotmail dot com
It apears on windows 2000 a typical dialog box, reporting :
php.exe - Application Error

The instruction at "0x00b929a5" referenced memory at "0x0000000". The memory could not be read.
With the option to close the application.

the web browser gives a cgi error after that.

i found the problem is on the second line with the hostaddr, if i use only host= it work fine.
 [2002-04-23 01:40 UTC]
It appears to connetion string parse problem when there is invalid value(s) is in it.

There is no "hostaddr" parameter. Use "host".

 [2002-04-23 01:48 UTC]
Oops. This should be libpq or pgsql problem.
I cannot fix it. 

BTW, what PostgreSQL version are you using?
 [2002-07-07 19:57 UTC]
Not PHP bug -> bogus.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 10:01:31 2024 UTC