Bug #74499 [NEW]: Regression using `host:port` on mysqli constructor
| From: | jorge at bitnami dot com | Date: | Tue, 25 Apr 2017 16:47:24 +0000 |
| Subject: | Bug #74499 [NEW]: Regression using `host:port` on mysqli constructor | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-208793@lists.php.net to get a copy of this message | ||
From: jorge at bitnami dot com
Operating system: Debian 8.7
PHP version: 7.1.4
Package: MySQLi related
Bug Type: Bug
Bug description:Regression using
host:port on mysqli constructor
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 bug report at https://bugs.php.net/bug.php?id=74499&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74499&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74499&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74499&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74499&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74499&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74499&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74499&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74499&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74499&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74499&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74499&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74499&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74499&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74499&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74499&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74499&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74499&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74499&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74499&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74499&r=mysqlcfg