clientraw.txt file

I have my site with Saratoga Weather templates up and running,, and I am having an issue with the clientraw file that is getting used. I located all the template files in a folder named /weather2. My clientraw file is in a folder named /weather. I created a link to the clientraw file and that seems to work fine, however, because of an issue with the Weather-Display FTP, sometimes a copy of the clientraw file ends up in the root folder too. When the page initially loads it uses the correct clientraw file info, but if there is a copy in the root, it then immediately reverts to that copy to get it’s info. I must assume that I have something configured incorrectly in one of the files but I don’t know what or where. Does anyone have any idea where my problem lies.

Can you show the path in your Settings.php file to your Clientraw.txt
because it looks as though it is updating correctly

Here it is:

$SITE[‘clientrawfile’] = ‘clientraw.txt’; // relative FILE location of clientraw.txt

You’ve got it set up to upload to /weather, right?

I’m learning so bear with me too :slight_smile:

$SITE[‘clientrawfile’] = ‘./weather/clientraw.txt’; // relative FILE location of clientraw.txt

Yes, that is correct.

Change in your Settings.php file to point to your clientraw.txt

$SITE[‘clientrawfile’] = ‘./weather/clientraw.txt’; // relative FILE location of clientraw.txt

ok, i’ll try that but I think it should have worked the way it was as there is a symbolic link to it.

There’s two things you’ll need to change to get it to work with your setup:

First, the ajaxWDwx.js script in your /weather2 directory should have

var clientrawFile = '/weather/clientraw.txt'; // location of clientraw.txt relative to this page on website

… the JavaScript needs to have the URL location of clientraw.txt, and the specification above shows your clientraw.txt is always in
The ‘…/clientraw.txt’ would have been interpreted as having your clientraw.txt in (which it is not).

Second, the Settings.php needs to have the relative FILE address of clientraw.txt so the thermometer.php (and other scripts) can locate it. The correct setting for your template in /weather2 directory is

$SITE['clientrawfile'] = '../weather/clientraw.txt'; 

which says 'go up one directory, the down to the /weather directory to find the file. Your current specification of ‘./weather/clientraw.txt’ means 'from this directory (/weather2), go down to the weather/ directory to find the file … it implies your clientraw would be found in /weather2/weather/clientraw.txt.

I think you’d find it easier to just install the template in your /weather directory (with the rest of the uploaded WD files), as you’ll need to make changes in other pages to accomodate the fact that the WD files are really in another directory parallel to this one. I’d urge you to simplify your customization and future maintenance of the template by moving the template files (and the subdirectories) to the same directory your WD uploads your clientraw.txt, graphics and reports.

Best regards,


Thanks for your advice.

I also use weather-display Live so I hope by moving the template files to the /weather directory I will not mess that up.

Assuming I move everything to my /weather directory where my WD files all are, what changes do I need to make to the settings.php or any other files?

You can leave the change to ajaxWDwx.js that I’d cited above in place. The Settings.php should be changed to

$SITE['clientrawfile'] = 'clientraw.txt'; 

as the file will be in the same directory as the template.

It shouldn’t disturb any of your existing WDL files at all. It can even ‘peacefully coexist’ with the wxN.html files from the Carterlake/AJAX HTML template set since it uses all new names for the wx…php scripts.
Don’t forget to move the ./forecast/images and ./ajax-images directories to the /weather directory too :slight_smile:

Best regards,

Thanks again Ken!

The move has been done.

Congrats. Wish I coulda been a little more help.

no problem Tony. Everything helps. I appreciate your trying.

I buy a TON of stuff from a company that was in East Hartford.
Discount Trophy (now Marco Plastic Industries)

They’re in S. Windsor now.

oh yes. I know of them. I have bought from them in the past.


You’re a trophymaker too?

no, they used to sell them and we would get them for our little league teams

Oh gotcha. That was when they did retail. Now they have 28 wholesale locations.

Yes, that’s correct. I didn’t know they stopped retail.