php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #77511 Support for socket stream
Submitted: 2019-01-23 23:29 UTC Modified: -
From: ininflamable at gmail dot com Assigned:
Status: Open Package: MySQLi related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-01-23 23:29 UTC] ininflamable at gmail dot com
Description:
------------
To connect to MySQL through an ssh tunnel, we now have to have a process that opens that tunnel and then close that process when it is not necessary.

It would be much simpler if you could open a socket stream and when opening the connection with MySQL, specify that you do it through that socket stream.

Test script:
---------------
$scp = ssh2_connect($host, 22)
ssh2_auth_pubkey_file($scp, $user, $pub_key, $pem_key, $key_pwd);
$tunnel = ssh2_tunnel($scp, 'localhost', 3306);
$db = new mysqli(null, 'root', null, null, null, $tunnel);


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Nov 12 08:01:35 2019 UTC