Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66601 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3528 invoked from network); 13 Mar 2013 19:08:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Mar 2013 19:08:04 -0000 Authentication-Results: pb1.pair.com header.from=zelnaga@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=zelnaga@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.48 as permitted sender) X-PHP-List-Original-Sender: zelnaga@gmail.com X-Host-Fingerprint: 74.125.82.48 mail-wg0-f48.google.com Received: from [74.125.82.48] ([74.125.82.48:53616] helo=mail-wg0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 11/06-05197-29EC0415 for ; Wed, 13 Mar 2013 14:08:03 -0500 Received: by mail-wg0-f48.google.com with SMTP id 16so1309841wgi.27 for ; Wed, 13 Mar 2013 12:08:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=FVIHTfdpIxW9hrWOdEmVXUs1UPvsCvxo+plPWh6FCeg=; b=HYdudaEfIKp2XTcUmQqdZQhUWepOX1rYw55upBI6nMC+2pm1bteMbu2diHWwjpSUiE ihco5R68trGxj37hyOt4NjrqUNLTLlXLQ5vvA4QdPCl8/NiGom9zHg3uV2bPT6nN9coR sR4esHjtIPYtg/h5ld37sSTzdNR5Vy/iWP4+OGdYPDX0DM7xbv/o8LFyYLzrWadvd4Eg lEM5iJkcRO5Yt270eXunSEO4BPYoKPhQI3PcGsCIfUqMXuva6ytN9c1I2NyCCYVwPD52 cpJZ0zBupSHAQVeImAR40L5NEG/NYsQc/U29ymkllWmY5VD64nIkxAH7/xovMvMhxk7J sOlg== MIME-Version: 1.0 X-Received: by 10.180.185.44 with SMTP id ez12mr28906054wic.33.1363201680416; Wed, 13 Mar 2013 12:08:00 -0700 (PDT) Received: by 10.194.216.10 with HTTP; Wed, 13 Mar 2013 12:08:00 -0700 (PDT) Date: Wed, 13 Mar 2013 14:08:00 -0500 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: idea: add wrapper support to mysqli_connect From: zelnaga@gmail.com (Thomas Anderson) Instead of passing localhost to mysqli_connect as the $host parameter I think it'd be useful if you could pass something like ssh2.tunnel://user:pass@example.com:22/192.168.0.1:14 to it as well. The main advantage I see of doing that is that you could tunnel through SSH2, through SOCKS, through HTTP CONNECT, etc, a lot more easily than you currently can. Like you could have an SSH connection re-created every time a PHP script is called and a tunnel dynamically made instead of having a persistent tunnel created with autossh or whatever. And even if SSH2 / SOCKS / CONNECT don't exist as built-in wrappers custom stream wrappers could be made. This would additionally make it easy for people to examine the underpinnings of MySQL. Instead of intercepting the packets the MySQL client sends out and placing them into an SSH tunnel or whatever one could just dump them to a log file to better understand how MySQL clients work internally.