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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ininflamable at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

History

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. (https://github.com)(https://www.publix-passport.com/)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 16:01:29 2024 UTC