I have disabled the error reporting that Meteotemplate throws if cache folder is no writeable, how ever the warning is still there if i inspect the page. something is wrong here
Warning shows it deletes and recreates the same date file
Is there anyone that has found why this happens or how to fix
attached you will see my cache folder and also the error from the browser
You can see that its writeable by the file structure
Cache Folder IIS
- Daali
- Advisor

- Posts: 56
- Joined: Mon Jul 26, 2021 8:06 pm
- Location: Georgia, US
- Station model: Ecowitt GW1002
- Software: Meteobridge, FOSHKplugin
- Contact:
Re: Cache Folder IIS
I guess whatever system user PHP is using has a rights issue?
https://www.jeffersonweather.com
GW1000 gateway
WS68 Anemometer
WH40 Rain Gauge
WH32 Temp/Hum
WH57 Lightning
WH41 PM2.5 Air Quality
WH45 PM2.5/10/Co2 Air Quality
WN34S Soil temperature
WH31SM Soil Moisture
GW1000 gateway
WS68 Anemometer
WH40 Rain Gauge
WH32 Temp/Hum
WH57 Lightning
WH41 PM2.5 Air Quality
WH45 PM2.5/10/Co2 Air Quality
WN34S Soil temperature
WH31SM Soil Moisture
-
davidefa
- Expert

- Posts: 888
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: Cache Folder IIS
The warning you reported is relative to the homepage/blocks/summary/cache folder.
You can try the following:
- extract the attached scripts in your homepage/blocks/summary folder
- from the browser execute the unlink1.php script ( https://hurricanepub.com/homepage/block ... nlink1.php )
- this should delete the homepage/blocks/summary/cache/yesterday.txt file, using a relative path to the file, in the same way as the summary block does ( and it should not work, as it does not work in the summary block )
- from the browser execute the unlink2.php script ( https://hurricanepub.com/homepage/block ... nlink2.php )
- this should delete the homepage/blocks/summary/cache/yesterday.txt file, using an absolute path to the file ( hope it works )
a) if both scripts fail you should have problems with folder permission
b) if the unlink2.php succeeds you should have problems with file access using relative paths
P.S.
In any case you should have similar problems with other blocks/plugins that use a cache folder ( they generally fail without reporting anything )
You can try the following:
- extract the attached scripts in your homepage/blocks/summary folder
- from the browser execute the unlink1.php script ( https://hurricanepub.com/homepage/block ... nlink1.php )
- this should delete the homepage/blocks/summary/cache/yesterday.txt file, using a relative path to the file, in the same way as the summary block does ( and it should not work, as it does not work in the summary block )
- from the browser execute the unlink2.php script ( https://hurricanepub.com/homepage/block ... nlink2.php )
- this should delete the homepage/blocks/summary/cache/yesterday.txt file, using an absolute path to the file ( hope it works )
a) if both scripts fail you should have problems with folder permission
b) if the unlink2.php succeeds you should have problems with file access using relative paths
P.S.
In any case you should have similar problems with other blocks/plugins that use a cache folder ( they generally fail without reporting anything )
- Attachments
-
- unlink.zip
- (502 Bytes) Downloaded 359 times
-
spd2612
- Forecaster

- Posts: 185
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Jonesboro Ar
- Station model: Ecowitt Wittboy /GW2000
- Software: ECOWITT Plugin
- Contact:
Re: Cache Folder IIS
Well I did not see your replys Thank you for them
However IIS and PHP are very funny the way they play togeather
I did this
created a simple PHP file on the concerned website. The content of this file was:
<?php var_dump(ini_get('fastcgi.impersonate')); ?>
I Navigated to this file using a browser.
My browser shows :
string(1) "1"
I ran this from cmd prompt
%windir%\system32\inetsrv\appcmd.exe list config "My Web Site" ^
/section:anonymousAuthentication
And to my surprise PHP was not running on the APP Pool for that site
here is the return from cmd prompt
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" userName="IUSR" />
</authentication>
</security>
</system.webServer>
So I added IUSER to the cache folder and gave it write permissions
Then uncomented the lines in indexDesktop.php Now its all good
I guess just because the web site runs under its appPool, that does not mean PHP BACK END GOES THE SAME WAY
I got this info from a different source but here it is if anyone needs it
However IIS and PHP are very funny the way they play togeather
I did this
created a simple PHP file on the concerned website. The content of this file was:
<?php var_dump(ini_get('fastcgi.impersonate')); ?>
I Navigated to this file using a browser.
My browser shows :
string(1) "1"
I ran this from cmd prompt
%windir%\system32\inetsrv\appcmd.exe list config "My Web Site" ^
/section:anonymousAuthentication
And to my surprise PHP was not running on the APP Pool for that site
here is the return from cmd prompt
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" userName="IUSR" />
</authentication>
</security>
</system.webServer>
So I added IUSER to the cache folder and gave it write permissions
Then uncomented the lines in indexDesktop.php Now its all good
I guess just because the web site runs under its appPool, that does not mean PHP BACK END GOES THE SAME WAY
I got this info from a different source but here it is if anyone needs it
Code: Select all
The first thing to do is to create a simple PHP file on the concerned website. (It's important to create the file on the concerned website because each website can have a different setting.) The content of this file should be:
<?php var_dump(ini_get('fastcgi.impersonate')); ?>
Navigate to this file using a browser.
** Case 1 **
If your browser shows :
string(1) "1"
Then, you need to execute the following command (you need to replace "Default Web Site" by the name you gave to your website in IIS) :
%windir%\system32\inetsrv\appcmd.exe list config "Default Web Site" ^
/section:anonymousAuthentication
You will receive an answer which looks like this :
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" userName="IUSR" />
</authentication>
</security>
</system.webServer>
The information you are looking for is the value of the username attribute of the anonymousAutthentification tag.
If this value is not empty, its content is the name of the user you need to give write permissions to.
If this value is empty or if the attribute is simply missing, you need to give write permissions to IIS AppPool\AppPoolName (replace "AppPoolName" with the name of your website's application pool).
** Case 2 **
If your browser shows :
string(1) "0"
You need to give write permissions to IIS AppPool\AppPoolName (replace "AppPoolName" with the name of your website's application pool).-
spd2612
- Forecaster

- Posts: 185
- Joined: Thu Jan 23, 2020 4:00 pm
- Location: Jonesboro Ar
- Station model: Ecowitt Wittboy /GW2000
- Software: ECOWITT Plugin
- Contact:
Re: Cache Folder IIS
I have been running IIS servers since the early 90’s and Microsoft just wont leave crap alone
Whats the point of being able to pick a app pool to run iis under if you still have to manually add credentials for php to use for non default permissions