New Zealand Local Weather Forum

Weather Discussion => Hardware Software and Technology => Weather Display => Topic started by: JennyLeez on April 22, 2016, 10:49:31 PM

Title: Clientraw.txt iframed - Help please
Post by: JennyLeez on April 22, 2016, 10:49:31 PM
JennyLeez: Tony your clientraw appears to be uploading ok but neither the Map script or data summary is able to read it. Any ideas?
Today at 11:10:08 AM

TonyC: No Jenny. WU and The british Met service can read it ok as the station is showing up on teir maps. I've rebooted both the Server and the WD computer. The only change since Wed is the Server upgraded to a new OS version Wed night.
Today at 12:01:25 PM

TonyC: I seem to recall that we had a problem when I moved from a hosted service to my own server. Using the ip number seemed to fix it.
Today at 12:05:21 PM

TonyC: Would you like me to email you the clientraw.txt file?
Today at 12:12:49 PM

Wolfie33: Hey Guys, just had a quick look, svaed file as text . . its blank. More fiddling, Firefox thinks its in a frame!
Today at 05:58:31 PM

TonyC: clientraw file?
Today at 06:09:47 PM

Wolfie33: Yep
Today at 06:11:19 PM

TonyC: I'm suspicious of my Synology Disstation upgrade from 5.2 to 6.0. They've had 3 updates since it was released last month. The latest which I've just applied is supposed to fix a file date/time problem, but perhaps it hasn't.
Today at 06:17:53 PM

TonyC: *DiskStation*
Today at 06:18:27 PM

TonyC: I don't think I can revert back to 5.2

Title: Re: Clientraw.txt iframed - Help please
Post by: JennyLeez on April 22, 2016, 10:53:14 PM
JennyLeez: Tony you are sending a different file to WU and Metservice. They are not reading this clientraw.txt

---------------------------------------------------------------------------------
Ok here is the page source. You will see why our scripts can not read it.
I will ask our Guru for his input.
What is creating this page? Weather Display?


Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="">
<meta name="keywords" content="">
<title>Port Robinson, North Canterbury. NZ</title>
</head>
<body style="border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline;">
<iframe src="http://xxx.xx.xxx.xxx/clientraw.txt" style="width:100%; height:100%; border:none !important; margin:0px !important; padding:0px !important;"/>
</body>
</html>
Title: Re: Clientraw.txt iframed - Help please
Post by: TonyC on April 23, 2016, 09:09:34 AM
Jenny,

If you load the clientraw.txt into firefox using the portrobinson domain name it goes into a frame
If you load it using the ip number instead, it's not in a frame.
#&@%ed if I know why this is so!
Can your map script look up the IP rather than the domain name? It is a fixed ip.
Title: Re: Clientraw.txt iframed - Help please
Post by: JennyLeez on April 23, 2016, 11:35:21 AM
Hi Tony,

We are using the IP address. This was how we circled around it when we first added your station onto the map.
That copy and paste above is just the IP number removed.

To quote our Guru; it would appear that the 'holding' server doesn't understand that it should deliver .txt 'raw' and is effectively doing a redirect as .html

In google chrome if you open your clientraw.txt. Right click on the page bringing up the menu. Left click 'View Source' you will see the same as I posted above.

Cheers
Title: Re: Clientraw.txt iframed - Help please
Post by: TonyC on April 23, 2016, 11:55:34 AM
I'll Check on the Synology site and post a message to see if anyone else is having problems.
cheers
TC
Title: Re: Clientraw.txt iframed - Help please
Post by: TonyC on April 23, 2016, 06:40:34 PM
I'm wondering whether I'm able to do anything either using a .htaccess file in the root directory or make changes to the httpd.conf file. The server is Apache 4.2.
Any of the Gurus know what command lines I should be putting in?
I think it's something to do with the mime type?
I checked and .htaccess is enabled

TC
Title: Re: Clientraw.txt iframed - Help please
Post by: Wolfie33 on April 23, 2016, 07:03:59 PM
Don't know anything about that Tony, but I have just noticed your now active on the Live Map.  :)

a moment later . . . and now your not ??
Title: Re: Clientraw.txt iframed - Help please
Post by: TonyC on April 23, 2016, 07:11:09 PM
I just created a line in .htaccess
AddType text/plain .txt

Previous to that I'd set the .htaccess to download as a file. I'll have a play.............
Title: Re: Clientraw.txt iframed - Help please
Post by: TonyC on April 23, 2016, 07:27:46 PM
I have finally found the solution after some homework on the web.
The answer was to create a .htaccess file and add the single line to it.

AddType application/octet-stream txt

cheers
TC