php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8168 mysql server on a different host and port
Submitted: 2000-12-08 09:59 UTC Modified: 2000-12-11 06:25 UTC
From: halfleeg at yahoo dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.3pl1 OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: halfleeg at yahoo dot com
New email:
PHP Version: OS:

 

 [2000-12-08 09:59 UTC] halfleeg at yahoo dot com
if you make a variable with an host:port
and open an connection it will REMOVE THE :
between host and port
the diff file of php_mysql.c is this(marco van eck fixt the
bug it will help you antill the php pepole fixt it).


--------------------------------------------------------

351c351,352
<                                       host =
(*yyhost)->value.str.val;
---
>                                       host = (char
*)malloc((*yyhost)->value.str.len+1);
>
strcpy(host,(*yyhost)->value.str.val);
362c363,364
<                                       host =
(*yyhost)->value.str.val;
---
>                                       host = (char
*)malloc((*yyhost)->value.str.len+1);
>
strcpy(host,(*yyhost)->value.str.val);
375c377,378
<                                       host =
(*yyhost)->value.str.val;
---
>                                       host = (char
*)malloc((*yyhost)->value.str.len+1);
>
strcpy(host,(*yyhost)->value.str.val);
425a429
>                               if(ZEND_NUM_ARGS()>0)
free(host);
430a435
>                               if(ZEND_NUM_ARGS()>0)
free(host);
443a449
>                               if(ZEND_NUM_ARGS()>0)
free(host);
452a459
>                               if(ZEND_NUM_ARGS()>0)
free(host);
477a485
>                               if(ZEND_NUM_ARGS()>0)
free(host);
507a516
>                               if(ZEND_NUM_ARGS()>0)
free(host);
515a525
>                               if(ZEND_NUM_ARGS()>0)
free(host);
528a539
>                               if(ZEND_NUM_ARGS()>0)
free(host);
539a551
>                               if(ZEND_NUM_ARGS()>0)
free(host);
546a559
>                               if(ZEND_NUM_ARGS()>0)
free(host);

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-11 06:18 UTC] stas@php.net
Could you please provide an example of troublesome code? I
fail to understand what's the problem from your patch.
 [2000-12-11 06:25 UTC] stas@php.net
Actually, already fixed in CVS.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 07:00:01 2026 UTC