php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24176 Pear DB 1.4.0 stable DSN port bug
Submitted: 2003-06-13 12:04 UTC Modified: 2003-06-14 23:26 UTC
From: kevinwatt dot bbs at lls dot twbbs dot org Assigned: cox (profile)
Status: Closed Package: PEAR related
PHP Version: 4.3.2 OS: Debian
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: kevinwatt dot bbs at lls dot twbbs dot org
New email:
PHP Version: OS:

 

 [2003-06-13 12:04 UTC] kevinwatt dot bbs at lls dot twbbs dot org
Description:
------------
====================================================
zen stockbook # /usr/bin/php stock.inc
mssql://user:passwd@tcp(203.73.xx.xxx:5005)/POSsrc
/tds/login.c: tds_connect: 203.73.xx.xxxx:1433: Connection refused
DB Error: connect failed
=====================================================

Reproduce code:
---------------
in  function parseDSN($dsn)   

- line 551 if (strpos($proto_opts, ':') !== false) {
                                        ^^^^ 
                                        here is the problem.


Expected result:
----------------
http://tw2.php.net/manual/tw/function.strpos.php

zen stockbook # /usr/bin/php stock.inc

mssql://user:passwd@tcp(203.73.53.166:5005)/POSsrc

/tds/login.c: tds_connect: 203.73.53.166:1433: Connection refused
DB Error: connect failed

Actual result:
--------------
can't connect.

+ line 551 if (strpos($proto_opts, ':') !=== false) {

couse 

http://www.php.net/manual/en/function.strpos.php

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-13 12:07 UTC] kevinwatt dot bbs at lls dot twbbs dot org
[13 Jun 12:04pm CDT] kevinwatt dot bbs at lls dot twbbs dot org

Description:
------------
====================================================
zen stockbook # /usr/bin/php stock.inc
mssql://user:passwd@tcp(203.73.xx.xxx:5005)/POSsrc
/tds/login.c: tds_connect: 203.73.xx.xxxx:1433: Connection refused
DB Error: connect failed
=====================================================

Reproduce code:
---------------
in  function parseDSN($dsn)   

- line 551 if (strpos($proto_opts, ':') !== false) {
                                        ^^^^ 
                                        here is the problem.

Expected result:
----------------
http://tw2.php.net/manual/tw/function.strpos.php

zen stockbook # /usr/bin/php stock.inc

mssql://user:passwd@tcp(203.73.**.***:5005)/POSsrc

/tds/login.c: tds_connect: 203.73.**.***:1433: Connection refused
DB Error: connect failed

Actual result:
--------------
can't connect.

+ line 551 if (strpos($proto_opts, ':') !=== false) {

couse 

http://www.php.net/manual/en/function.strpos.php
 [2003-06-13 13:20 UTC] cox@php.net
There is nothing wrong with the use of strpos(). Instead there is a problem with the mssql driver which doesn't care on the passed port.

I'll fix it in the next days. Thanks for the report.
 [2003-06-14 13:34 UTC] kevinwatt dot bbs at lls dot twbbs dot org
Oops. Thank you very much.  :D
 [2003-06-14 23:26 UTC] cox@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 08 05:03:34 2021 UTC