Bug #74499 [Opn->Dup]: Regression using `host:port` on mysqli constructor

From: Date: Tue, 25 Apr 2017 16:51:32 +0000
Subject: Bug #74499 [Opn->Dup]: Regression using `host:port` on mysqli constructor
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208794@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74499&edit=1 ID: 74499 Updated by: peehaa@php.net Reported by: jorge at bitnami dot com Summary: Regression using host:port on mysqli constructor -Status: Open +Status: Duplicate Type: Bug Package: MySQLi related Operating System: Debian 8.7 PHP Version: 7.1.4 Block user comment: N Private report: N New Comment: Dupe of 74432 Previous Comments: ------------------------------------------------------------------------ [2017-04-25 16:47:17] jorge at bitnami dot com Description: ------------ new mysqli no longer accepts ip:port as first parameter (host) ip:port works in PHP 7.1.3 and 7.0.17 ip:port does not work in PHP 7.1.4 and 7.0.18 ``` # php --version PHP 7.1.4 (cli) (built: Apr 25 2017 03:19:44) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies ``` ``` # php --version PHP 7.0.18 (cli) (built: Apr 25 2017 03:43:44) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies ``` Used php official container from https://hub.docker.com/_/php/ Enabled mysqli module with docker-php-ext-install mysqli Test script: --------------- <?php $servername = "ensembldb.ensembl.org:3306"; $username = "anonymous"; $password = ""; $conn = new mysqli($servername, $username, $password); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } echo "Connected successfully"; ?> Expected result: ---------------- Connected successfully Actual result: -------------- PHP Warning: mysqli::__construct(): (HY000/2002): Failed to parse address "ensembldb.ensembl.org:3306:3306" in /root/pepe.php on line 7 Connection failed: Failed to parse address "ensembldb.ensembl.org:3306:3306" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74499&edit=1

« previous php.bugs (#208794) next »