|  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
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);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2024-03-11 09:22 UTC] jamie652cordeiro at outlook dot com
Thanks for sharing this. I have also faced the same issue. Then we get some solution for this issue. (
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 11:01:28 2024 UTC