php.net |  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
Votes:1
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
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: ruivilela at hotmail dot com
New email:
PHP Version: OS:

 

 [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)

Script:

<?php
$db_handle = pg_connect("dbname=ensite2001 hostaddr=100.100.0.2 user=rvilela password=xxxxxx");
if ($db_handle)
	echo "Connection attempt succeeded.<br>\n";
else
	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";

pg_freeresult($result);
pg_close($db_handle);
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-06 19:12 UTC] yohgaki@php.net
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=100.100.0.2 it work fine.
 [2002-04-23 01:40 UTC] yohgaki@php.net
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] yohgaki@php.net
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] sniper@php.net
Not PHP bug -> bogus.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 22:01:29 2024 UTC