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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
50 - 4 = ?
Subscribe to this entry?

 
 [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

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: Tue Apr 23 15:01:32 2024 UTC