faludi / xig

XBee Internet Gateway for Digi ConnectPort X2(de)/4/8, OSX, Windows and Linux
1 stars 0 forks source link

unable to write more than 1 variable per request #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.trying to input 3 variables into a data dump
2.using rather legnthy names to push the data 
3. (potential different issue) not able to push data into a mySql database 
using php commands

What is the expected output? What do you see instead?
Expecting to display the 3 variables and their values.  Instead I only get the 
first value and nothing else

What version of the product are you using?
1.3

Please provide any additional information below.

Below is my php code:
<?php
        // xig_upload_example.php
        // this code accepts any data uploaded as a GET variable and stores it
        //  into a text file called dataFile.txt on the server
        $celtempvalue = $_GET["celtempvalue"];        
        $moisturevalue = $_GET["moisturevalue"];
        $farentempvalue = $_GET["moisturevalue"];
        $myFile = "dataFile.txt";

        $fh = fopen($myFile, 'a') or die("can't open file");
    //fwrite(echo date("D, d M Y H:i:s O"));
    fwrite($fh, "Celcius:  ");
    fwrite($fh, $celtempvalue);
        fwrite($fh, "\n");
    fwrite($fh, "Farenheit:  ");
    fwrite($fh, $farentempvalue);
        fwrite($fh, "\n");
        fwrite($fh, "Percent Saturated:  ");
    fwrite($fh, $moisturevalue);
        fwrite($fh, "\n");
        fwrite($fh, "\n");
        fclose($fh);
?>
My requestes are sent via:

http://www."myregistereddomainname".com/ecc/farmgrid.php?celtempvalue=celtempval
ue&farentempvalue=farentempvalue&moisturevalue=moisturevalue

With the variables named celtempvalue, farentempvalue, and moisturevalue in my 
program.  I've looked and seen the full request being sent to the Xig, and 
whenever I type in values in a web broswer, it generates the text document 
properly.

Original issue reported on code.google.com by cannady....@gmail.com on 12 Oct 2011 at 8:44

GoogleCodeExporter commented 9 years ago
Currection--I have an old version. My $farentempvalue = $_GET["moisturevalue"]; 
has been corrected to $farentempvalue = $_GET["farentempvalue"]; and still 
doesn't pass 3 values

Original comment by cannady....@gmail.com on 12 Oct 2011 at 9:36

GoogleCodeExporter commented 9 years ago
Does it work if you make the URL shorter? In other words if you name your 
variables ct, ft and mt does everything get passed properly then? I thinking it 
may be something related to going over 72 characters or so in the URL you're 
sending, rather than the number of variables per se.

Original comment by robfal...@gmail.com on 12 Oct 2011 at 9:42

GoogleCodeExporter commented 9 years ago
Hey, that worked!  I thought the 72 character limit was fixed in this release, 
but maybe I pretended to read that somewhere.

I'm going to test if parsing mysql commands though php work alright and if I 
run into issues I'll make sure to report it.  Thank you for the help!  This is 
a great script (I sat through the presentation at the Maker Faire last year in 
NYC).  Perhaps I'll find a way to contribute somehow.  Thanks again!

Original comment by cannady....@gmail.com on 13 Oct 2011 at 3:42

GoogleCodeExporter commented 9 years ago
Just wanted to add a quick note that at 2AM I got my mySQL data dumps from an 
Xbee-Xig relationship working properly!  This little possibility increases the 
power immensely as I can now write queries based on data collected from an Xbee 
enabled device.  When I have a moment one of these days I'll write a quick 
how-to for others to read.  This little program is great! Keep up the great 
work.

Original comment by cannady....@gmail.com on 13 Oct 2011 at 1:14

GoogleCodeExporter commented 9 years ago
This is related to the 72-character length failure articulated more clearly by 
Issue 15. It has been scheduled and we'll get to work on it as soon as we can!

Original comment by Jordan.H...@gmail.com on 2 Dec 2011 at 1:33

GoogleCodeExporter commented 9 years ago
Please see Issue 15 for more information and a work-around.

Original comment by Jordan.H...@gmail.com on 10 Dec 2011 at 10:25