Page 1 of 1
Cache Folder Not Writeable
Posted: Thu Oct 14, 2021 11:41 pm
by spd2612
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
Re: Cache Folder Not Writeable
Posted: Fri Oct 15, 2021 7:46 am
by davidefa
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
Re: Cache Folder Not Writeable
Posted: Fri Oct 15, 2021 12:10 pm
by spd2612
I run that command and it returns SUCCESS

- Untitled.jpg (13.08 KiB) Viewed 40448 times
Re: Cache Folder Not Writeable
Posted: Fri Oct 15, 2021 12:15 pm
by davidefa
Check if the cache/apiLog.txt was generated ( it should contain the data you passed )
Re: Cache Folder Not Writeable
Posted: Fri Oct 15, 2021 12:25 pm
by spd2612
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
Re: Cache Folder Not Writeable
Posted: Fri Oct 15, 2021 1:15 pm
by davidefa
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 )
Re: Cache Folder Not Writeable
Posted: Fri Oct 15, 2021 1:32 pm
by spd2612
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
Re: Cache Folder Not Writeable
Posted: Fri Oct 15, 2021 1:43 pm
by davidefa
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.
Re: Cache Folder Not Writeable
Posted: Fri Oct 15, 2021 2:17 pm
by spd2612
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
Re: Cache Folder Not Writeable
Posted: Fri Oct 15, 2021 2:39 pm
by davidefa
Thanks, what is the line to add for the indexDesktop redirect?
Re: Cache Folder Not Writeable
Posted: Fri Oct 15, 2021 3:14 pm
by spd2612
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();
}
Re: Cache Folder Not Writeable
Posted: Fri Oct 15, 2021 3:16 pm
by spd2612
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
Re: Cache Folder Not Writeable
Posted: Fri Oct 15, 2021 4:49 pm
by davidefa
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.
Re: Cache Folder Not Writeable
Posted: Fri Oct 15, 2021 7:34 pm
by spd2612
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
Re: Cache Folder Not Writeable
Posted: Sun Oct 17, 2021 4:15 pm
by spd2612
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";
// }
// }
Re: Cache Folder Not Writeable
Posted: Wed Oct 20, 2021 7:43 am
by johnathan
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.