Thread: bug in 2.2.0 ?
Brought to you by:
iridium
From: Phil P. <phi...@sw...> - 2004-01-02 23:07:22
|
I've just downloaded 2.2.0 Unpacked it on my web server Configured it through the configuration webpage HTTP to index.php Select country Select Airport/ICAO Click SUBMIT returns back to the default form - no METAR data displayed. Turned on Warnings as well as errors. No warnings/errors displayed. Ran the test program, no problem. Ran the 'speed test' program, no problem (though, obviously slow, as I'm not using a database). I added the following lines into the output, for debugging. (after echo output) echo "<br>Here's the RAW output data<br><pre>\n"; print_r($data); echo "</pre>\n"; NO data displayed. I added many and various 'debug comment' lines in odd places, appended to $output. It *always* and *for every country/ICAO* says "ICAO was invalid". if ($icao != '') { $output .= "<br>we got an ICAO<br>\n"; $weather->set_icao($icao); /* icao was passed, we resolve country code */ $cc_temp = $weather->get_country_code(); if ($cc_temp === false) { /* turn icao off, it is not valid */ $icao = ''; $output .= "<br>ICAO was invalid<br>\n"; } else { /* use resolved country code */ $cc = $cc_temp; } } Thanks, Phil P |
From: Phil P. <phi...@sw...> - 2004-01-02 23:54:06
|
I tried configuring PHPWeather to use MySQL (which I'm using quite happily for a variety of things). PHPWeather refused to create the tables. Of course, there's zero debug output (sigh). My access to MySQL is 'localhost' (hosted by my ISP, as-is, no other options), and so I'm wondering if your script assumes/requires access via IP (ie refuses to use the local/unix socket access method). Also: I futz'd with your index.php and FORCED the $cc to 'AU', so it now downloads and decodes a METAR. Obviously there's something wrong somewhere (incorrect setup/missing file/permission??) but this lets me continue trying working on things. I'm in Sydney, Australia. A METAR that I decoded just now says "a moment ago, at 03:14 UTC". Localtime 10:45am being GMT+10+1, so 03:14 UCT is not "a moment ago" (It's either 20 hours [and change] ago, or a little under 4 hours in the future). Or am I missing something? Thanks, Phil P |
From: Phil P. <phi...@sw...> - 2004-01-03 00:20:10
|
I printed it out, it's empty. (ie enclosed in single quotes, prints out consecutive single quotes) [ugh] Yeah, the last 1.?? version (I have no idea which, it was a while ago) I played with worked fine. 2.2 comes with TAF decoding, so I thought I'd play with that. Unfortunately, either it's broken or I've not uploaded/installed it correctly. Thanks, Phil P KISS wrote: > Morning Phil, > quick dumb question, what have you got in $cc_temp ? > For your else statement > $cc = $cc_temp; > Just to clear things up as to if/else statement for return of info. I am > not personally using version 2.2.0 as I was happy with version 1.62 and > have had no need to update, but have to start with the basics to help you. > > cheers and regards > Gregg > Cairns, Queensland > > ----- Original Message ----- > *From:* Phil Pierotti <mailto:phi...@sw...> > *To:* php...@li... > <mailto:php...@li...> > *Sent:* Saturday, January 03, 2004 9:07 AM > *Subject:* bug in 2.2.0 ? > > I've just downloaded 2.2.0 > Unpacked it on my web server > Configured it through the configuration webpage > > HTTP to index.php > Select country > Select Airport/ICAO > Click SUBMIT > > returns back to the default form - no METAR data displayed. > > Turned on Warnings as well as errors. > No warnings/errors displayed. > > Ran the test program, no problem. > Ran the 'speed test' program, no problem (though, obviously slow, as > I'm > not using a database). > > I added the following lines into the output, for debugging. > (after echo output) > > echo "<br>Here's the RAW output data<br><pre>\n"; > print_r($data); > echo "</pre>\n"; > > > NO data displayed. > > I added many and various 'debug comment' lines in odd places, appended > to $output. > > It *always* and *for every country/ICAO* says "ICAO was invalid". > > if ($icao != '') { > $output .= "<br>we got an ICAO<br>\n"; > $weather->set_icao($icao); > /* icao was passed, we resolve country code */ > $cc_temp = $weather->get_country_code(); > if ($cc_temp === false) { > /* turn icao off, it is not valid */ > $icao = ''; > $output .= "<br>ICAO was invalid<br>\n"; > } else { > /* use resolved country code */ > $cc = $cc_temp; > } > } > > Thanks, > Phil P > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for > IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys > admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > <http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click> > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > <mailto:PHP...@li...> > https://lists.sourceforge.net/lists/listinfo/phpweather-devel > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.557 / Virus Database: 349 - Release Date: 30/12/2003 |
From: Phil P. <phi...@sw...> - 2004-01-03 00:41:46
|
mmm , time passes, Sydney issues a new METAR report. The time displayed from PHPweather hasn't changed, (ie still showing 'The report was made a moment ago, at 03:14 UTC. ') even though the raw METAR data says 030000Z, and the other data in the displayed report are updated. I'd be interested to hear someone explain why the text display of the time of the report bears no relationship to the reality of the actual METAR timestamp, and how/where in the code I can fix that. Thanks, Phil P |
From: Phil P. <phi...@sw...> - 2004-01-03 00:54:00
|
After a little searching, I found where the 'decode the time from the METAR data' was *commented out* from decode_metar(). UnCommenting it returned the time decoded from the METAR itself. I'd still be interested to learn where (else/oherwise) it was getting time from, and why it was done that way. (I'm new to this, so maybe there's a good reason for it?) Thanks, PhilP Phil Pierotti wrote: > mmm , time passes, Sydney issues a new METAR report. > > The time displayed from PHPweather hasn't changed, (ie still showing > 'The report was made a moment ago, at 03:14 UTC. ') even though the raw > METAR data says 030000Z, and the other data in the displayed report are > updated. > > I'd be interested to hear someone explain why the text display of the > time of the report bears no relationship to the reality of the actual > METAR timestamp, and how/where in the code I can fix that. > > Thanks, > Phil P > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel > > |