If this reply is not too late yet, can I ask why you need the data stored specifically in wincache's user cache? That seems to be a needless complication, since spinning up a memcache instance (or any other key/value store) would allow you to side-step the
whole issue.
Still, if you really need the data stored in wincache, perhaps you could try executing "additional_scipt.php" through the web server instead of command line (i.e.: do a request to "http://localhost/additional_scipt.php?request=params")? This way you'd get
to the user cache without having to wade your way for the correct worker process account :-)
Alternatively, you might want to supply a custom account for the site's worker process to run as. Then execute your command-line script via runas with those same credentials. Although in that case you'd need to properly configure the permissions for that
new account as well..
Well we need that because duration of webservice query is more than 10-20 sec for 1000 cars so if every single user (about 20-40) asking about data every minute they would kill server or wait very long.
first option i tried and it works but i don't know if it is good idea.
i tried running worker process as my user (administrator) but it didn't work.
for now i stopped thinking about wincache and for this purpose i use memcache(works through TCP). But i think if i find some time at work i will try again.
i can see that we have ne version of wincache so i want to ask about this question again.
Is there any option of modyfying user cache not runing script via http request?
We have cache of object which is refreshed every minute by php script which is run by windows scheduler by predefined system user
Wincache works fine from CLI, however, the cache is not saved acrosss each instance (process). Is that what you are asking? I've seen documentation on how to make that work using a environment variable (APP_POOL_ID), but have been unable to make it work.
HCamper
8048 Posts
Re: Running script from command line and use cache from IIS
Jan 18, 2012 12:35 PM|LINK
Hi,
Check the information for "The IUSR and IUSR_MachineName Account in IIS 7."
The DefaultAppPool has Access to the cache which your using on website.
Check the PHP manual for wincache tests and information :
The PHP Manual wincahe the dll.:
If the extension is enabled, then the phpinfo output will list the configuration settings provided by the WinCache.
http://www.php.net/manual/en/wincache.installation.php
Martin
Community Member Award 2011
codemole
7 Posts
Re: Running script from command line and use cache from IIS
Jan 24, 2012 06:42 AM|LINK
If this reply is not too late yet, can I ask why you need the data stored specifically in wincache's user cache? That seems to be a needless complication, since spinning up a memcache instance (or any other key/value store) would allow you to side-step the whole issue.
Still, if you really need the data stored in wincache, perhaps you could try executing "additional_scipt.php" through the web server instead of command line (i.e.: do a request to "http://localhost/additional_scipt.php?request=params")? This way you'd get to the user cache without having to wade your way for the correct worker process account :-)
Alternatively, you might want to supply a custom account for the site's worker process to run as. Then execute your command-line script via runas with those same credentials. Although in that case you'd need to properly configure the permissions for that new account as well..
Redgood
11 Posts
Re: Running script from command line and use cache from IIS
Jan 24, 2012 07:07 AM|LINK
Well we need that because duration of webservice query is more than 10-20 sec for 1000 cars so if every single user (about 20-40) asking about data every minute they would kill server or wait very long.
first option i tried and it works but i don't know if it is good idea.
i tried running worker process as my user (administrator) but it didn't work.
for now i stopped thinking about wincache and for this purpose i use memcache(works through TCP). But i think if i find some time at work i will try again.
Redgood
11 Posts
Re: Running script from command line and use cache from IIS
Mar 26, 2013 08:34 AM|LINK
i can see that we have ne version of wincache so i want to ask about this question again.
Is there any option of modyfying user cache not runing script via http request?
We have cache of object which is refreshed every minute by php script which is run by windows scheduler by predefined system user
laurin1
257 Posts
Re: Running script from command line and use cache from IIS
Mar 26, 2013 05:06 PM|LINK
Wincache works fine from CLI, however, the cache is not saved acrosss each instance (process). Is that what you are asking? I've seen documentation on how to make that work using a environment variable (APP_POOL_ID), but have been unable to make it work.
Redgood
11 Posts
Re: Running script from command line and use cache from IIS
Mar 27, 2013 09:51 AM|LINK
Yes i want to access cache of my app_pool from CLI.
do you have link to this documentation?
laurin1
257 Posts
Re: Running script from command line and use cache from IIS
Mar 27, 2013 12:32 PM|LINK
Well, now that I've re-read this, I'm not sure that it's possible:
http://forums.iis.net/t/1170877.aspx/1
https://bugs.php.net/bug.php?id=59164