PHP Forum

PHP Forum (http://www.selfphp.de/forum/index.php)
-   PHP für Fortgeschrittene und Experten (http://www.selfphp.de/forum/forumdisplay.php?f=13)
-   -   PHP Tunnel (http://www.selfphp.de/forum/showthread.php?t=14902)

lusitaz 20.10.2006 19:33:06

PHP Tunnel
 
Hallo Ihrs,

bin gerade dabei MySQL-Front einzurichten damit ich meine Datenbanken auf meinem Webserver verwalten kann... Leider muss die Verbindung über einen PHP Tunnel gemacht werden und ich habe keine Ahnung wie das funktioniert!?

Hab ein bisschen gegoogelt aber nichts gescheites gefunden... Kennt sich einer von Euch damit aus? Habt Ihr vielleicht den einen oder anderen Link wo ich mal nachlesen kann?

Danke Euch!

Gruß

Lusitaz

xabbuh 21.10.2006 16:40:38

AW: PHP Tunnel
 
Was verstehst du denn bitte unter einem PHP-Tunnel?

lusitaz 21.10.2006 20:02:20

AW: PHP Tunnel
 
Hi,

das ist doch meine Frage :)

In MySQL-Front lässt sich eine Verbindung zum Webserver mittels "PHP Tunnel" machen. Weiss aber nicht genau was das ist, daher frage ich ja :)

Gruß

xabbuh 22.10.2006 22:31:42

AW: PHP Tunnel
 
Gibt es auch eine genauere Beschreibung, was MySQL Front darunter versteht?

lusitaz 22.10.2006 23:24:56

AW: PHP Tunnel
 
sooo... habe es gefunden, getestet und es funzt...

hier die Erklärung aus MySQL-Front:

----------------------------------

What is a PHP tunnel and how does it work?

Some ISPs permit access to the MySQL database only from the Web server due to reasons of security. This means MySQL-Front cannot access the database normally (error: Access denied).

This problem can be circumvented with the use of so-called PHP tunnel.

Install the PHP script phpMySQL.php (included with the program) on the Web server. Then, from within the session, select the connection type "PHP tunnel" and specify the respective URL of the PHP script.

MySQL-Front converts the database query into an HTTP request and sends this request to the PHP script on the Web server. (The script can access the database since it is, same as the other scripts, located on the Web server.) The PHP script then converts the reply of the database and sends it as the HTTP result back to MySQL-Front.

Unfortunately, this is somewhat awkward and also significantly slower than any direct access. However, this makes it possible to access the database even if the provider does not permit access any other way.

Important note:

Since PHP doesn't support to use resources in sessions each single database request opens a new database process and close them after receiving the single response. Because of this by using the PHP Tunnel the database is not be able to remember any session settings like variables, rollback or something like this.

Important note:

By using the the PHP tunnel the requests will be handled by PHP. PHP has not been designed to handle database connections to a client application (MySQL-Front.exe). Because of this there are limited timeout settings. Since the most ISP uses the default "Safe Mode" of PHP the phpMySQL.php script can't change the timeout setttings.

Maybe the Web server (f. e. Apache) has set a timeout too.

In both cases the PHP tunnel can't handle big database requests.

For normal working there are no problems. But for exporting / transfering big tables maybe the tunnel doesn't work. The bug message "lost connection" shows this problem.

----------------------------------

trotzdem danke dir!!

gruß

xabbuh 23.10.2006 14:41:33

AW: PHP Tunnel
 
Alles klar. Allerdings solltest du in diesem Fall dein PHP-Script, das MySQL Front für den Tunnel verwenden will, per .htaccess-Datei mit einem Passwortschutz versehen, da ansonsten jeder, der dein Script aufruft, beliebige SQL-Statements absetzen kann.


Alle Zeitangaben in WEZ +2. Es ist jetzt 11:28:36 Uhr.

Powered by vBulletin® Version 3.8.3 (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.