6 Replies Latest reply on Feb 5, 2009 4:49 AM by itsdpk

    Problem connecting to stratus

      hi guys,

      i tried this both cocomo and the stratus thing these past days and i think these both are really cool stuff..

      right now i am tied up at one point with the stratus connection.

      i downloaded from the link from adobe...but somehow i am not able to connect to the system,
      i placed the reg.cgi in my cgi-bin and also created the database in sqlite3 and i also installed python 2.5.

      but wen i log in i get HTTP error message in the status text box...

      i have given my webserviceurl as localhost...is that a prob?
      i aslo tried using php insted of python but tht too is stuck with the same prob..

      any suggestions will be of great help

      thanks in advance,
        • 1. Re: Problem connecting to stratus
          Michael Thornburgh Adobe Employee
          your web server should have access and error logs. the error log specifically might contain useful error output messages that could help you track down the problem. is reg.cgi executable in its location? does its #! at the top point to the correct location of your python interpreter? does the script point to the correct location of the database? can you use a tool like "curl" (or just your web browser) to access the web service manually, to make sure it's doing the expected?

          having "localhost" as the hostname for your webservice url shouldn't be a problem as long as you're only trying to access it from the same computer where it's running.
          • 2. Problem connecting to stratus
            itsdpk Level 1
            hi micheal ,
            thank you for your response,
            i am using windows so i don't think the interpreter would be a concern since it is for UNIX portability of python but i have givent he intertretter path at the top too, and i also found the script from my browser (manually)...and also the database...
            i am getting a "register faliure error"...what could be posibly wrong???
            i guess it could be my db not getting updated from python..

            if you have suggestions please lemme know...
            thnks in advance
            • 3. Re: Problem connecting to stratus
              Michael Thornburgh Adobe Employee
              when you access the script manually from your browser, do you get xml output suggesting the script ran, or do you get the source code of the script suggesting that it is *not* running, but just being returned as a plain document? for example, if you try to connect to your service from your browser with


              (assuming you put it in "cgi-bin" and it's called "reg.cgi", on a computer called "hostname"), you should get back XML that looks like

              <?xml version="1.0" encoding="utf-8"?>

              check the log files of your web server to see if there are error messages that might suggest what the problem is (exceptions from python, for example).
              • 4. Problem connecting to stratus
                itsdpk Level 1
                thanks mike for your response...

                but i am getting the xml result in the browser thts wht i treid to explain in my reply,
                and its also gvin me the reply to post methods to friends,

                but wen i tried inserting values to the datbase through the insert query (c.execute )
                the database is updated wen i hardcode the user and identity, the xml result was true, wen i took the db i culd see the new tuples too..

                wen i tried '?' and entered the details it came as update false in the xml and db was not updated too

                the user and identity is getting printed b4 the execute query so i guess it culdnt be the prob of local or global declaration?
                ...so...i am kinda puzzled with the python script now maybe coz i am new to python...

                if u got any more suggestions/advice plz let me know....

                thanks in advance
                • 5. Re: Problem connecting to stratus
                  Michael Thornburgh Adobe Employee
                  update=false means that an exception occurred in the insert query. that suggests it doesn't like the "?" notation used in the query string.

                  when you have something in the database, can you retrieve it using the "friends=username" HTTP query string? if that returns the value you inserted manually into the database, then the sqlite3 module understands the "?" notation in the query string. if it does not, that suggests that your sqlite3 python module is older and doesn't use that notation. older versions of the sqlite3 python module use "%s" instead of "?" in the query string for parameter substitution. if the lookup query doesn't work, try changing the "?"s to "%s" in the two SQL queries in the script.

                  from your python interpreter, you can check the version of the sqlite3 module by doing

                  >>> import sqlite3
                  >>> sqlite3.version

                  please post what version your sqlite3 python module is. the one on my computer where "?" works is '2.3.2'.


                  • 6. Re: Problem connecting to stratus
                    itsdpk Level 1
                    hi mike thanks for ur replies,

                    i am using SQLite expert professional.7.7 and sqlite library version 3.6.7
                    so could it be the issue with my db nad python..i am geting friend list from db so i think it understands the '?'..it also takes " %s "

                    thanks in advance mike