forums › forums › SQLyog › Using SQLyog › Http Tunneling Stopped Working
- This topic is empty.
-
AuthorPosts
-
-
January 23, 2006 at 10:30 pm #9457bb144Member
Hi,
Has anyone experienced this yet? If you haven't you may soon will.
Apparently my ISP has made a change that prevents me from accessing my database with HTTP tunneling. Now when I try to access my account, I get the following error message
Quote:HTTP Error No. 12019HTTP Error. The handle is in the wrong state for the requested operation
Is there a work around for this problem?
-
January 23, 2006 at 10:42 pm #20306peterlaursenParticipant
I largely agree on your diagnosis that things may have changed at your ISP! The error message
Quote:HTTP Error. The handle is in the wrong state for the requested operationis very simple to reproduce with HTTP-tunnel. I have my own WAMP-stack. If I shut down Apache I get this error when trying to connect with HTTP-tunnel. So simply this error occurs if webserver/php -system cannot be contacted by the tunneling script. NB: I edited this!!
Sure that webserver is not down at the moment?
However can you connect with a script of your own like (where you substituete all that starts with ** with your own values):
Code:connecting“;
mysql_connect(“**host”,”**user”,”**pw”);
echo “Connection OK
“;
$phpeter = phpversion();
$minapache = apache_get_version();echo “
 –  PHP version is “;
echo “$phpeter“;
echo “ –  Apache version is “;
echo “$minapache“;
$database = “**database”;
mysql_select_db($database);
echo “The database '”;
echo $database;
echo “' is selected“;
mysql_close();
?>All what works in mysql_connect(“**host”,”**user”,”**pw”); above should also work with SQLyog!
Maybe you can find something here that can help you:
-
January 23, 2006 at 10:51 pm #20307peterlaursenParticipant
And the above script returns this (see attached) on my local system.
This is a php_mysql version of the script. I can copy in a php_mysqli -version of same. However SQLyog does not work with php_mysqli .
-
January 23, 2006 at 11:00 pm #20308peterlaursenParticipant
Also check the settings of your Control Panel. For instance that the .php extension is enabled with the PHP-preprocessor!
-
January 23, 2006 at 11:26 pm #20309bb144Member
Thanks for the script. It worked perfectly. It appears that I can access the database. But I still cannot get access with SQLyog. It was working yesterday, but not today (?)
My current configuration is as follows:
LOCAL SETTINGS:
– Windows XP SP2
– SQLyog Enterprise v5.02 (also tried it with v4.07)
REMOTE SETTINGS:
– using http tunneling (and yes, I made sure I am using the right SQLyogTunnel.php file)
– Port 3306
– Server OS: Linux 2.4.28-grsec-20050113a
– HTTP Server: Apache/1.3.33 (Unix)
– PHP Version: 4.4.2 (Zend: 1.3.0)
– Database: MySQL 4.0.20-standard
As far as I know there has been no database name change and no path changes. I will double check…
-
January 23, 2006 at 11:33 pm #20310peterlaursenParticipant
No! The script is bad. Even is I stop MYSQL it displays 'Connection Succesful'.
Wait 5 minutes!
-
January 23, 2006 at 11:55 pm #20311peterlaursenParticipant
Try this.
Code:connecting“;
$connct = mysql_connect(“**host”,”**user”,”**pw”);
echo “$connect
“;
$phpeter = phpversion();
$minapache = apache_get_version();echo “
– PHP version is “;
echo “$phpeter“;
echo “– Apache version is “;
echo “$minapache“;
$database = “*db”;
mysql_select_db($database);
echo “The database '”;
echo $database;
echo “' is selected“;
$vis = “SELECT count(*) FROM $database.**mytable;”;
echo “Query goes as: >>>>
“;
echo $vis;
echo ” >>>>“;
$resultat = mysql_query($vis) or die (mysql_error());
echo “Query succesfull
“;
$row = mysql_fetch_array($resultat, MYSQL_NUM);
echo “Query result :
“;printf (“%s rows in database: %s $database”,$row[0],$row[2]);
mysql_close();
?>It displays like attached
-
January 23, 2006 at 11:57 pm #20312peterlaursenParticipant
And I ABSOLUTELY am no coder! Stooped being so when TurboPascal went out!
-
January 24, 2006 at 12:00 am #20313peterlaursenParticipant
And if I stop MySQL I get the MySQL client error returned!
-
January 24, 2006 at 12:16 am #20314peterlaursenParticipant
It is very likely that the php_mysql extension for some reason was not loaded with Apache last time it was started!
You could try the mysql_ping() function.
-
January 24, 2006 at 12:21 am #20315bb144Memberpeterlaursen wrote on Jan 23 2006, 11:57 PM:And I ABSOLUTELY am no coder! Stooped being so when TurboPascal went out![post=”8551″]<{POST_SNAPBACK}>[/post]
Peter, you are telling your age! 😀 TurboPascal was the last course I took as well! 😆
Anyway, it appears that my server and database are up and running. I was able to access a table and count the rows. So now I turn my attention to my SQLyog settings. First of all I'm going to reboot my local system…
-
January 24, 2006 at 12:30 am #20316peterlaursenParticipant
hmmm …
did they do something so that the SQLyog tunnelling script does not work ???
It is a problem with connection from the tunnelling script to Apache/PHP!
Is the tunnelling script and my script in same folder?
There could be some setting that restricted PHP to use or not to use scripts from certain folders ?!
-
January 24, 2006 at 1:47 am #20317peterlaursenParticipant
To summarize:
1) I get the same error if I stop Apache and try to connect with HTTP-tunnel.
2) If I start Apache without the php_mysql extension i DO NOT get this error but a HTTP error report.
3) If I start Apache wthout PHP at all, I also don't get this error but also a HTTP-error report
4) If I stop MySQL I simply get “Can't connect to MySQL Server etc.”. Further the experiments with the scripts show that Apache<>PHP<>php_mysql<>Mysql chain is functioning OK in general.
This must mean that the tunnelling script does not even succeed in creating the initial steps of connection to Apache.
But why?? Apache configuration changed? PHP-configuration changed? Could you ask at your ISP, if there has been any change in configurations? And don't forget to answer back if you find the reason for it!
-
January 24, 2006 at 1:49 am #20318bb144Memberpeterlaursen wrote on Jan 24 2006, 12:30 AM:There could be some setting that restricted PHP to use or not to use scripts from certain folders ?![post=”8555″]<{POST_SNAPBACK}>[/post]
I put the files in the same folder and got the same result. The script works. SQLyog does not.
I'm sure the ISP has done something. I'm going to ask them to restart Apache.
-
January 24, 2006 at 1:58 am #20319peterlaursenParticipant
Did you try uploading the Tunnelling file again??
It could be corrupted!
-
January 24, 2006 at 2:25 am #20320peterlaursenParticipant
one thing more:
there is a logging option:
Search the tunnelling file for
Code:/* uncomment this line to create a debug log */
/*define ( “DEBUG”, 1 );/*Uncomment the last line and lets see if it yields something.
The logfile 'yogtunnel.log' is created on the server in the folder of the tunnelling file.
Provided permissions allow for it.
-
January 24, 2006 at 2:26 am #20321bb144Member
I uploaded the tunnel script several times (from different installs). I'm talking to ISP now. Will be back with an answer (hopefully) tomorrow.
-
January 24, 2006 at 2:28 am #20322bb144Memberpeterlaursen wrote on Jan 24 2006, 02:25 AM:one thing more:
there is a logging option:
Search the tunnelling file for
Code:/* uncomment this line to create a debug log */
/*define ( “DEBUG”, 1 );/*Uncomment the last line and lets see if it yields something.
The logfile 'yogtunnel.log' is created on the server in the folder of the tunnelling file.
Provided permissions allow for it.
[post=”8560″]<{POST_SNAPBACK}>[/post]I'll try this now.
-
January 24, 2006 at 2:57 am #20323bb144Member
Here is the output from yogtunnel.log
Quote:Enter aremodulesinstalledEnter AreModulesInstalled
Enter processquery
Enter showaccesserror
Exit showaccesserror
Exit AreModulesInstalled
Enter aremodulesinstalled
Enter AreModulesInstalled
Enter processquery
Enter getdetailsfrompostedxml
Enter startelement
Exit startelement
Enter startelement
Exit startelement
Enter startelement
Exit startelement
Enter charhandler
Exit charhandler
Enter endElement
Exit endElement
Enter startelement
Exit startelement
Enter charhandler
Exit charhandler
Enter endElement
Exit endElement
Enter startelement
Exit startelement
Enter charhandler
Exit charhandler
Enter endElement
Exit endElement
Enter startelement
Exit startelement
Enter charhandler
Exit charhandler
Enter endElement
Exit endElement
Enter endElement
Exit endElement
Enter startelement
Exit startelement
Enter startelement
Exit startelement
Enter charhandler
Exit charhandler
Enter endElement
Exit endElement
Enter startelement
Exit startelement
Enter charhandler
Exit charhandler
Enter endElement
Exit endElement
Enter endElement
Exit endElement
Enter endElement
Exit endElement
Exit getdetailsfrompostedxml
Trying to connect
Connected
Enter SetName
DB=n
Client=n
Server=n
Exit SetName
Enter ExecuteSingleQuery
mysql_num_rows in ExecuteSingleQuery
Enter HandleExtraInfo
Exit HandleExtraInfo
Enter aremodulesinstalled
Enter AreModulesInstalled
Enter processquery
Enter showaccesserror
Exit showaccesserror
Exit AreModulesInstalled
Any clues? Were the db, client, and server names supposed to be inserted?
-
January 24, 2006 at 3:06 am #20324peterlaursenParticipant
Let the developers have a look at it!
They start at work in India in about two hours!
With this 'unhappy ending'
Code:Enter aremodulesinstalled
Enter AreModulesInstalled
Enter processquery
Enter showaccesserror
Exit showaccesserror
Exit AreModulesInstalled… they must be able to tell to exactly corresponding codeline in the tunnelling file and in sja.exe! Looks to me like Apache does not report correctly about the php_mysql extension (or some other extension) – or SQLyog does not understand it.
There have been a lot of new PHP releases recently. On *nix it is common that you compile them yourself. Maybe your ISP did so – and forgot some compiler flag.
Did you write what was the PHP-version? The script told you!
-
January 24, 2006 at 3:16 am #20325bb144Member
The server is running php 4.2.2
Let's hope the developers have an answer! Thanks for your help.
-
January 24, 2006 at 3:18 am #20326bb144Memberbb144 wrote on Jan 24 2006, 03:16 AM:The server is running php 4.2.2[post=”8567″]<{POST_SNAPBACK}>[/post]
CORRECTION! Make that PHP 4.4.2
-
January 24, 2006 at 3:22 am #20327peterlaursenParticipant
My logfile starts identically
but near the end at 'Connected' it goes different
Code:Trying to connect
Connected
Enter SetName
DB=latin1n
Client=latin1n
Server=latin1n
Exit SetName
Enter ExecuteSingleQuery
mysql_num_rows in ExecuteSingleQuery
Enter HandleExtraInfo
Exit HandleExtraInfo
Enter convertxmlchars
Input: version()
Output: version()
Exit convertxmlchars
Enter convertxmlchars
Input:
Output:
Exit convertxmlchars
Enter convertxmlchars
Input: 13
Output: 13
Exit convertxmlchars
Enter GetCorrectDataTypeAnd goes on for L-O-N-G …..
hmmm 'Connected' it says .. which two connected? SJA and the tunneller or SJA and Apache …
-
January 24, 2006 at 3:25 am #20328peterlaursenParticipant
-
January 24, 2006 at 3:37 am #20329bb144Member
My ISP's build date was Jan 17.
-
January 24, 2006 at 3:49 am #20330peterlaursenParticipant
I can easily connect with HTTP-tunnelling to Apache 2.0.55/PhP 4.4.2 with HTTP-tunneling. All running on windows (and precompiled binaries). I shall not attempt to compile it on Linux without a RPM script to control the gnuCC compiler on my SuSE Linux ….
Tested with both MySQL 5.0.18 and 4.0.26 .. No problems!
Undoubtedly something happened with that php update at your ISP. Maybe the developers can give a more specific hint when they get back to work! I know from my own experience that good arguments can be important with ISP's !
-
January 24, 2006 at 3:59 am #20331bb144Memberpeterlaursen wrote on Jan 24 2006, 03:49 AM:I know from my own experience that good arguments can be important with ISP's ![post=”8572″]<{POST_SNAPBACK}>[/post]
Yes! If you can get through to them! I'm not even sure they want me accessing my db this way. We'll find out tomorrow! 😉
Thanks again.
-
January 24, 2006 at 8:03 am #20332peterlaursenParticipant
Just for those PHP beginners – like me 😀 – I updated the script.
Now there is no more than what there need to be in the printf() function!
Code:connecting“;
$connct = mysql_connect(“**host”,”**user”,”**pw”);
echo “$connct
“;
$myapache = apache_get_version();
echo “Apache and PHP -versions are:
“;
echo “$myapache
“;
echo ““;
$database = “**db”;
mysql_select_db($database);
echo “The database '”;
echo $database;
echo “' is selected“;
$tabel = “**tbl”;
$showquery = “SELECT count(*) FROM $database.$tabel;”;
echo “Query goes as: >>>>
“;
echo $showquery;
echo ” >>>>“;
$result = mysql_query($showquery) or die (mysql_error());
echo “Query succesfull
“;
$row = mysql_fetch_array($result, MYSQL_NUM);
echo “Query result :
“;printf (“%s rows in – – – database: $database – – – table: $tabel “,$row[0]);
mysql_close();
?> -
January 24, 2006 at 3:11 pm #20333bb144Member
OK, now when I try to connect with SQLyog, I'm getting a 403 error page
Quote:error 403: Forbidden!Verboten!
Es sind nur ungenügende Zugriffsrechte gesetzt. Bitte ändern Sie die Rechte mit Ihrem FTP-Programm.
It looks like my tunneling capability has been shut down. Can the tunneling file be changed to compensate?
-
January 24, 2006 at 3:24 pm #20334RiteshMember
English?
-
January 24, 2006 at 3:27 pm #20335peterlaursenParticipant
links:
http://www.modwest.com/help/kb1-144.html
http://www.usd.edu/charlie/faqs/server_errors.html
and a general google search:
http://www.google.com/search?client=opera&…=utf-8&oe=utf-8
Can you CHMOD the folders on your webhost with a FTP-client.
SJA needs to write the session.xml and the -log file SOMEWHERE.
It looks like your ISP is messing up permissions!
syntax for SJA:
==========
Command line syntax is
sja jobfile.xml -llog.txt -ssession.xml
The -s and -l parameters for specifying the session file and the log file are optional. A complete file path can be specified. That is useful if you don’t have write privilege to the installation folder. If not specified default values logfile.txt and session.xml are used and file are placed in the directory from where SJA runs
=========================================
Is it a problem with SQLyog GUI or the SJA only ??
-
January 24, 2006 at 3:34 pm #20336peterlaursenParticipant
Sorry …
SJA would write those file on the client machine form where it is being run …'
I don't understand what is happenng now!
-
January 24, 2006 at 3:53 pm #20337bb144Member
Ritesh, sorry about the German.
Gentlemen, the problem has been corrected! My ISP restarted Apache and mysql (new build date for php = Jan 24 2006 10:47:24).
The 403 error was caused by me. I deleted the SQLyogTunnel.php file last night and forgot to copy it back before running SQLyog.
I am still not sure why things were not working in the first place, but as you suspected, Peter, it had something to do with the new version of PHP and my ISP not loading all the extensions.
SQLyog is the best mysql manager I've ever used. I was prepared to switch ISP's rather than give it up!
Thank you very much for your help!
Bob
-
January 24, 2006 at 4:04 pm #20338peterlaursenParticipant
😀
That should not happen anyway!
And people will blame SQLyog for such ISP failure .. 🙁
-
January 25, 2006 at 5:29 am #20339RiteshMember
Gosh. Three pages of discussion and it ends up being a problem with the ISP. I was getting tensed 🙂
Anyway, all's well that ends well. Maybe we can have a FAQ writeup on this issue.
Quote:SQLyog is the best mysql manager I've ever used. I was prepared to switch ISP's rather than give it up!Thats great to hear. Maybe you can ask your ISP to bundle SQLyog with their offering since they dont allow direct connection and SQLyog's HTTP Tunneling would be the best solution.
We have great bundling offers for ISPs.
-
January 25, 2006 at 5:36 am #20340peterlaursenParticipant
mail me or PM me your thoughts about a FAQ write-up.
We have this one allready:
-
January 25, 2006 at 6:42 am #20341peterlaursenParticipant
-
January 25, 2006 at 7:10 am #20342RiteshMember
We can probably have a link to this thread in the FAQ.
Maybe, bb144 can suggest something more.
-
-
AuthorPosts
- You must be logged in to reply to this topic.