Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Http Tunneling Stopped Working

forums forums SQLyog Using SQLyog Http Tunneling Stopped Working

  • This topic is empty.
Viewing 37 reply threads
  • Author
    Posts
    • #9457
      bb144
      Member

      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. 12019

      HTTP Error. The handle is in the wrong state for the requested operation

      Is there a work around for this problem?

    • #20306
      peterlaursen
      Participant

      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 operation

      is 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:

      http://www.webyog.com/faq/16_66_en.html

    • #20307
      peterlaursen
      Participant

      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 .

    • #20308
      peterlaursen
      Participant

      Also check the settings of your Control Panel. For instance that the .php extension is enabled with the PHP-preprocessor!

    • #20309
      bb144
      Member

      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…

    • #20310
      peterlaursen
      Participant

      No! The script is bad. Even is I stop MYSQL it displays 'Connection Succesful'.

      Wait 5 minutes!

    • #20311
      peterlaursen
      Participant

      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

    • #20312
      peterlaursen
      Participant

      And I ABSOLUTELY am no coder! Stooped being so when TurboPascal went out!

    • #20313
      peterlaursen
      Participant

      And if I stop MySQL I get the MySQL client error returned!

    • #20314
      peterlaursen
      Participant

      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.

      http://www.php.net/manual/en/function.mysql-ping.php

    • #20315
      bb144
      Member
      peterlaursen 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…

    • #20316
      peterlaursen
      Participant

      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 ?!

    • #20317
      peterlaursen
      Participant

      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!

    • #20318
      bb144
      Member
      peterlaursen 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.

    • #20319
      peterlaursen
      Participant

      Did you try uploading the Tunnelling file again??

      It could be corrupted!

    • #20320
      peterlaursen
      Participant

      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.

    • #20321
      bb144
      Member

      I uploaded the tunnel script several times (from different installs). I'm talking to ISP now. Will be back with an answer (hopefully) tomorrow.

    • #20322
      bb144
      Member
      peterlaursen 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.

    • #20323
      bb144
      Member

      Here is the output from yogtunnel.log

      Quote:
      Enter aremodulesinstalled

      Enter 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?

    • #20324
      peterlaursen
      Participant

      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!

    • #20325
      bb144
      Member

      The server is running php 4.2.2

      Let's hope the developers have an answer! Thanks for your help.

    • #20326
      bb144
      Member
      bb144 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

    • #20327
      peterlaursen
      Participant

      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 GetCorrectDataType

      And goes on for L-O-N-G …..

      hmmm 'Connected' it says .. which two connected? SJA and the tunneller or SJA and Apache …

    • #20328
      peterlaursen
      Participant

      php 4.4.2 is brand-new. 13th January.

      http://www.php.net/

      I think I can put it up on my system!

    • #20329
      bb144
      Member

      My ISP's build date was Jan 17.

    • #20330
      peterlaursen
      Participant

      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 !

    • #20331
      bb144
      Member
      peterlaursen 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.

    • #20332
      peterlaursen
      Participant

      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();
      ?>

    • #20333
      bb144
      Member

      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?

    • #20334
      Ritesh
      Member

      English?

    • #20335
      peterlaursen
      Participant

      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 ??

    • #20336
      peterlaursen
      Participant

      Sorry …

      SJA would write those file on the client machine form where it is being run …'

      I don't understand what is happenng now!

    • #20337
      bb144
      Member

      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

    • #20338
      peterlaursen
      Participant

      😀

      That should not happen anyway!

      And people will blame SQLyog for such ISP failure .. 🙁

    • #20339
      Ritesh
      Member

      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.

    • #20340
      peterlaursen
      Participant

      @ritesh

      mail me or PM me your thoughts about a FAQ write-up.

      We have this one allready:

      http://www.webyog.com/faq/21_30_en.html

    • #20341
      peterlaursen
      Participant

      Now, I did some write-up:

      http://www.webyog.com/faq/21_30_en.html

      Proposals are welcome!

    • #20342
      Ritesh
      Member

      We can probably have a link to this thread in the FAQ.

      Maybe, bb144 can suggest something more.

Viewing 37 reply threads
  • You must be logged in to reply to this topic.