Problems with MyDac 7.1.4 and http tunneling

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
pepetolo
Posts: 1
Joined: Fri 10 Feb 2012 17:39

Problems with MyDac 7.1.4 and http tunneling

Post by pepetolo » Fri 10 Feb 2012 17:47

Hi!
I am testing http tunneling. My code is:

MyConnection := TMyConnection.Create(self);
MyConnection.Server := 'localhost';
MyConnection.Port := 3306;
MyConnection.Username := 'usrxx';
MyConnection.Password := 'myxx';
MyConnection.database := 'dbxx';
MyConnection.Options.Protocol := mpHttp;
MyConnection.HttpOptions.Url := 'http://www.xxx.com/tunnel.php';

MyConnection.LoginPrompt := False;
MyConnection.Connect;

When I run the program I get this message "Failed to open _connections.id.php". I copied tunnel.php to my web server but I don't have more php files. Please, can you help me?

Thanks,

Pep

AndreyZ

Post by AndreyZ » Mon 13 Feb 2012 10:41

Hello,

The tunnel.php script creates the _connections.id.php file on a server. Please try connecting to a server and check if such file exists on a server after this. If it doesn't, it means that this file is removed by some antivirus software or firewall. To solve the problem, you should set up the software correctly so it doesn't remove the _connections.id.php file.

frednerk
Posts: 13
Joined: Tue 07 Feb 2012 02:50

Re: Problems with MyDac 7.1.4 and http tunneling

Post by frednerk » Fri 15 Jan 2016 08:11

I am also having the same problem.
My server is on a local Linux machine.
I have given 777 access to the www folder and it still comes up with the same error.
Any thoughts.

Tom

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Problems with MyDac 7.1.4 and http tunneling

Post by ViktorV » Fri 15 Jan 2016 09:53

The "Failed to open _connections.id.php " error may occur due to some limitations on the PHP server (an antivirus or firewall blocks creation of this file, file system access restrictions, etc.). Such server behavior doesn't depend on MyDAC and is not within our competence. To solve the problem, you should contact your ISP technical support.

frednerk
Posts: 13
Joined: Tue 07 Feb 2012 02:50

Re: Problems with MyDac 7.1.4 and http tunneling

Post by frednerk » Fri 15 Jan 2016 12:31

The server is running in my house.
It is a raspberry pi running Linux.
I just hoped someone else had seen the same error and had a solution.
Tom

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Problems with MyDac 7.1.4 and http tunneling

Post by ViktorV » Fri 15 Jan 2016 15:28

MyDAC allows to connect to MySQL http tunneling without additional setup, as well as any other software, in case if there are no restrictions (lack of access rights to the file system, closed ports, etc.). As we wrote above, this error may occur due to some restrictions on the side of PHP server or its settings.

frednerk
Posts: 13
Joined: Tue 07 Feb 2012 02:50

Re: Problems with MyDac 7.1.4 and http tunneling

Post by frednerk » Sat 16 Jan 2016 07:19

This is what I said, sorry about that.

I have had success in my setting up with my local machine with tunnel.php
However, if I run in debug mode I get a blocking error.
If I run the exe then all is now fine.
Any thoughts on how I can reconfigure the debug mode to accept this error and work.

Thanks in advance.

Tom

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Problems with MyDac 7.1.4 and http tunneling

Post by ViktorV » Mon 18 Jan 2016 14:11

Please provide the full error text that occurs in you application in debug mode.

frednerk
Posts: 13
Joined: Tue 07 Feb 2012 02:50

Re: Problems with MyDac 7.1.4 and http tunneling

Post by frednerk » Tue 19 Jan 2016 00:20

Windows 7 64 bit
Delphi 7 32bit

Exception class HttpException.
Error on reading data from connection.
A blocking operation to WSACancelBlockingCall.
Socket Error code: 100004

When this is run as a program all is fine.
Works like a charm, but not with the debugger.

Tom

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Problems with MyDac 7.1.4 and http tunneling

Post by ViktorV » Tue 19 Jan 2016 08:01

This exception is raised internally and it is processed by MyDAC. You can see this exception only if you run the application from IDE.
If you want to hide this message during the development of your application, then in the "Debugger Exception Notification" window select the "Ignore this exception type" check box and click "Continue".

frednerk
Posts: 13
Joined: Tue 07 Feb 2012 02:50

Re: Problems with MyDac 7.1.4 and http tunneling

Post by frednerk » Wed 20 Jan 2016 04:06

With Delphi 7 this option is not available.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Problems with MyDac 7.1.4 and http tunneling

Post by ViktorV » Wed 20 Jan 2016 12:18

To hide this message during development of your application in Delphi 7, you should follow the steps below:
- call the Debugger Options dialog using the main menu Tools-Debugger Options;
- on the Language Exception tab click the Add button;
- in the edit form enter HttpException and click Оk;
- click Ок in the Debugger Options dialog.

frednerk
Posts: 13
Joined: Tue 07 Feb 2012 02:50

Re: Problems with MyDac 7.1.4 and http tunneling

Post by frednerk » Thu 21 Jan 2016 02:27

Thanks for that.
Works like a charm. :D

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Problems with MyDac 7.1.4 and http tunneling

Post by ViktorV » Thu 21 Jan 2016 09:25

It is good to see that the problem has been solved. Feel free to contact us if you have any further questions about MyDAC.

Post Reply