Cache Folder Not Writeable

Post Reply
spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Cache Folder Not Writeable

Post by spd2612 » Thu Oct 14, 2021 11:41 pm

Your cache directory is not writable! Make sure cache folder in template root is writable
is at the top of my new template

I have verified that IIS IUSER and the App Pool has read write and execute in permissions
Also the files are upateing in the cache directory
but it is still displaying
Your cache directory is not writable! Make sure cache folder in template root is writable is at the top of my new template

at the top of the indexDesktop.php page only
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Cache Folder Not Writeable

Post by davidefa » Fri Oct 15, 2021 7:46 am

This should mean that the php interpreter has no write access to the directory.
You can test this calling the page ( modify domain and password as appropriate ):

Code: Select all

http://www.meteotemplate.com/template/api.php?U=1486255070&T=25.3&H=79.9&P=1010.1&W=5.6&G=7.8&R=0&RR=0&B=272&S=788&PASS=password123
this should generate a cache/apiLog.txt file
or you can run the setup of a block checking if the settings.php file is generated
Image

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: Cache Folder Not Writeable

Post by spd2612 » Fri Oct 15, 2021 12:10 pm

I run that command and it returns SUCCESS
Untitled.jpg
Untitled.jpg (13.08 KiB) Viewed 4645 times
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Cache Folder Not Writeable

Post by davidefa » Fri Oct 15, 2021 12:15 pm

Check if the cache/apiLog.txt was generated ( it should contain the data you passed )
Image

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: Cache Folder Not Writeable

Post by spd2612 » Fri Oct 15, 2021 12:25 pm

yest its there

Authorized access.
Current date/time: 2021-10-15 08:23:42
api called by http
update U: 1634300622

my site does run in https
there are no url redirect except on the index desktop php
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Cache Folder Not Writeable

Post by davidefa » Fri Oct 15, 2021 1:15 pm

So your cache directory is writable ( and the warning is erroneous ).
To get rid of this warning you could safely remove from the indexDesktop.php, starting at line 375 these 4 lines:

Code: Select all

				if($_SESSION['user']=="admin"){
					if(!is_writable("cache")){
						echo "Your cache directory is not writable! Make sure cache folder in template root is writable";
					}
				}
Only wondering that ( even if you remove the warning ) you may still have problems ( don't know where, maybe in your web server, I never used IIS ).
Only suggestion is to try one of those all-in-one servers ( Xampp or the like, with php <= 7.4 ).
If you choose the portable one you can try and delete if you don't like, it should not mess with your computer.
( I use it on a local installation for testing and it is ok )
Image

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: Cache Folder Not Writeable

Post by spd2612 » Fri Oct 15, 2021 1:32 pm

I did not have that message on my old install and it was iis 10 to

I think https might be the issue
Once you bind to it most browsers dont like mixed content
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Cache Folder Not Writeable

Post by davidefa » Fri Oct 15, 2021 1:43 pm

Yes the drawback of running a 'https' site is that you have to stick to 'https' content ( to avoid mixed content error )

P.S.
A few days ago helped an italian user whit his new meteotemplate installation ( on https server ), he has the new ecowitt ws1900 weather station.
The only way to make the ecowitt station to upload to the server was to disable the automatic redirect to https ( on the .htaccess file ), certainly there are other ways but I couldn't find one.
Image

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: Cache Folder Not Writeable

Post by spd2612 » Fri Oct 15, 2021 2:17 pm

That is correct if i use redirect for the whole site my uploads from ecowitt stop
I just add a redirect script to indexdesktop.php and in main setup i set it to https and then it all works as designed
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Cache Folder Not Writeable

Post by davidefa » Fri Oct 15, 2021 2:39 pm

Thanks, what is the line to add for the indexDesktop redirect?
Image

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: Cache Folder Not Writeable

Post by spd2612 » Fri Oct 15, 2021 3:14 pm

if(empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "off"){
$redirect = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header('HTTP/1.1 301 Moved Permanently');
header('Location: ' . $redirect);
exit();
}
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: Cache Folder Not Writeable

Post by spd2612 » Fri Oct 15, 2021 3:16 pm

Also just checked my php error log and here is what is happening Any Ideas ??

http://hurricanepub.com/plugins/sticker ... ype=random
[15-Oct-2021 11:12:38 America/New_York] PHP Notice: Undefined index: customStation in E:\hurricanepub\install\createConfig.php on line 97
[15-Oct-2021 11:12:38 America/New_York] PHP Notice: Undefined variable: limitPressMin in E:\hurricanepub\install\createConfig.php on line 198
[15-Oct-2021 11:12:38 America/New_York] PHP Notice: Undefined variable: limitPressMax in E:\hurricanepub\install\createConfig.php on line 201
[15-Oct-2021 11:12:38 America/New_York] PHP Notice: Undefined index: userCustomColor in E:\hurricanepub\install\createConfig.php on line 221
[15-Oct-2021 11:12:38 America/New_York] PHP Notice: Undefined index: userCustomFont in E:\hurricanepub\install\createConfig.php on line 227
[15-Oct-2021 11:12:38 America/New_York] PHP Notice: Undefined index: userCustomUnits in E:\hurricanepub\install\createConfig.php on line 233
[15-Oct-2021 11:12:38 America/New_York] PHP Notice: Undefined index: bannerID in E:\hurricanepub\install\createConfig.php on line 246
[15-Oct-2021 11:12:38 America/New_York] PHP Notice: Undefined index: alertActive in E:\hurricanepub\install\createConfig.php on line 426
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Cache Folder Not Writeable

Post by davidefa » Fri Oct 15, 2021 4:49 pm

Not super important wornings ( are generated because the code tries to access an undefined variable ), but the code works correctly.
The only errors are those on line 198 and 201 ( you will not get any warnings if you selected imperial units and set minimum or maximum pressure greater than 50inHg ), not super critical too.
Image

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: Cache Folder Not Writeable

Post by spd2612 » Fri Oct 15, 2021 7:34 pm

Ok here is what I noticed on the Cache Folder
I do not get the error at the top of the page if I clear my Cache on my web browser
Until I enter into Admin and then come back to the page then the error is back till I clear cache again

Any ideas what to do here
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: Cache Folder Not Writeable

Post by spd2612 » Sun Oct 17, 2021 4:15 pm

See above post! but I did this for now in the in the indexDesktop.php.
Everything in the CACHE folder is updating so It cant be a write issue.

// COMMENTED OUT TO REMOVE THE CACHE ERROR
// if($_SESSION['user']=="admin"){
// if(!is_writable("cache")){
// echo "Your cache directory is not writable! Make sure cache folder in template root is writable";
// }
// }
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

johnathan
Observer
Observer
Posts: 29
Joined: Thu Apr 08, 2021 1:14 pm
Station model: wh1080
Software: WU

Re: Cache Folder Not Writeable

Post by johnathan » Wed Oct 20, 2021 7:43 am

A software development team is typically comprised of a variety of developers who contribute to the design of your web and software development project. These individuals focus on several different aspects of the design, which includes incorporating your business https://mlsdev.com objectives and goals, evaluating your current designs, and making any changes that are necessary to the software. Once the designers have completed their evaluation of your site, they create a design plan. The plan often includes an objective statement, a strategy, a list of features that need to be included, and estimated costs for the project. The software development team works with the designers to make sure the objectives and costs are executed in the design phase.

Post Reply