Quantcast
Channel: Windows Cache Extension for PHP
Viewing all 197 articles
Browse latest View live

Making globally accessible cache entries

$
0
0

I use Win-Cache on our intranet, and a LOT of staff end up needlessly creating and storing absolutely identical data objects in the user cache.

Is there any way that I can configure Win-Cache to let me create global scoped items in the cache that can be retrieved byanyuser, not just the one that created it?

This would make the effectiveness of the cache, in our use case 1,000-times more effective.  I'd even be willing to control the access myself by uniquely naming the object keys with userid hashes if I could have globally accessible objects.

Any help would be appreciated,

Craig


Faulting application name: php-cgi.exe, version: 5.6.20.0

$
0
0

Hi,

how can I debug this?
We have multiple errors in our eventlog.

Faulting application name: php-cgi.exe, version: 5.6.20.0, time stamp: 0x56fd9d68

Faulting module name: php_wincache.dll, version: 1.3.7.8, time stamp: 0x561d2836

Exception code: 0xc0000005

Fault offset: 0x0000f54c

Faulting process id: 0x1b48

Faulting application start time: 0x01d199f4d8a4752a

Faulting application path: C:\Program Files (x86)\php\php-cgi.exe

Faulting module path: C:\Program Files (x86)\php\ext\php_wincache.dll

Report Id: 16666ca2-05e8-11e6-942f-005056960167

Faulting package full name:

Faulting package-relative application ID:

Windows Cache Extension 2.0

Re: IIS hangs/freezes randomly (Wincache crash)

$
0
0

alexandros_k

P8: 000064a9

This offset is in WinCache's memory allocation function for managing shared memory segments.  This crash indicates memory corruption in the shared memory segment.  The only recovery for this kind of corruption is to restart the site.  That's the only way to be sure that all of the php-cgi.exe process instances are closed, and the shared memory segments are released.

Investigating this is difficult, since it requires getting a full heap crash dump from all of the php-cgi.exe instances at the time of the first crash, and then groveling through the shared memory segments to figure out who could have possibly scribbled on the shared memory segment.

Please send me your wincache config settings in a private message.  I'd like to see if you have the wincache.srwlocks option still enabled.  My first suggestion would be to turn that off (wincache.srwlocks=0).

Thx!

    --E.

Opcode caching - Wincache or Zend?

$
0
0

We are having issues with Wincache Opcode caching using PHP 5.6 (which i will post separately).

I see that Opcode caching has been removed from Wincache 2.0 and as we are planning on moving to PHP 7 in the not too distant future I wanted to discuss my options. It seems like lots of people are having issues with Zend Opcache on windows that makes it effectively unusable. 

Is that your experience? Why did you decide to remove Opcode caching from Wincache 2.0?

I would love to know how people are handling this issues:

Installation

$
0
0

Hello,

How do you install or find the DLL extension for the latest version?

wincachewpi-2.0.0.6-7.0-nts-vc14-x64

Thanks!

2.0.0.7 stable as x64 DLL

$
0
0

Hi,

The PECL release doesn't have a DLL to download. Also the binaries on sourceforge are marked as 2.0.0.7-dev etc.

Can you please provide a 2.0.0.7 x64 DLL for download?

Thanks,
Mike

Release messaging needs a change

$
0
0

My organisation are reluctant to deploy Wincache because it is not clear what is the latest supported version and different locations give different information. This confusion creates doubt into the rigour involved in the release process. 

  1. https://www.iis.net/downloads/microsoft/wincache-extension Does not give latest version
  2. https://pecl.php.net/package/WinCache lists stable versions but the don’t exist in https://sourceforge.net/projects/wincache/files

Can we clear this up please? 

Thanks!


WinCache cache only lasting 5 seconds

$
0
0

We have php 5.4 running on IIS 7.5 server with WinCache. WinCache appears to be working, but the cache only lasts for about 5 seconds. After that, any objects that are cached appear to be ignored (possibly because they are destroyed) and php runs the non cache code again.  So, it appears that the cache is being dropped after about 5 seconds.

All of the WinCache settings seem fine and are pretty much the default. We aren't getting any errors. Also, i have tried extending the time of the cache in the code but that doesn't work either. ttl max is set to 1200

Has anyone had a similar problem?

Thanks

IISExpress, WinCache 2.0.0.7 and PHP7.0.12: Fails to add to user cache.

$
0
0

Hey there. I'm attempting to get WinCache 2.0.0.7 (non-thread-safe, x86) to play nicely with PHP 7.0.12 (non-thread-safe, x86) within an IISExpress environment, and I'm unable to do so.

- I extracted the DLL from the MSI installed by the executable available at the sourceforge repository.

- I've installed the extension into my php's "ext" directory.

- I've only got two configuration settings in my php.ini (after loading the extension):wincache.ucenabled=1, and wincache.ucachesize=128.

- phpinfo() shows that the extension is installed/enabled, and shows the relevant settings correctly.

- wincache_ucache_add('testKey', 'testVal', 600) fails. The function returns false.

- Using the same php.ini configuration file, I am able to successfully get wincache_ucache_add() and wincache_ucache_get() to work when using the command line (with the provided php.exe AND php-cgi.exe). This leads me to believe the issue is with IISExpress.

- Using the same configuration as I am for IISExpress, I am able to successfully get the above two functions to work when using full-blown IIS. This further leads me to believe the issue is with IISExpress.

Have I missed something in my configuration? Can anyone confirm that Wincache 2.0.0.7 works with PHP v7.0.12 on IIS Express? I'm open to any ideas that might resolve my issue.

FILELIST_CACHE / FILEMAP_INFO errors even after filecache is disabled.

$
0
0

We found we were getting the following errors on production:

PHP Fatal error:  WINCACHE: lock_readlock: acquired abandoned mutex Global\FILELIST_CACHE_5.6_1.3.7.4_1_0_608445_X. Something bad happend in another process! in C:\Program Files\..

and PHP Fatal error:  WINCACHE: lock_writelock: acquired abandoned mutex Global\FILEMAP_INFO_HRWLOCK_5.6_1.3.7.4_1_0_608445_X. Something bad happend in another process! in Unknown on line 0”

The confusing thing is these errors still occur when we disable filecaching.  We have therefore removed wincache from production but I would like to resolve these issues (with or without filecache) so I can re-instate wincache on production. 

Any ideas?

Here are are Winchache settings: 

wincache.ocenabled =1

wincache.fcenabled = 0

wincache.ucenabled = 1

wincache.fcachesize = 255

wincache.maxfilesize = 2048

wincache.ocachesize = 150

wincache.filecount = 8000

wincache.ttlmax = 2000

wincache.ucachesize = 85

wincache.scachesize = 128

wincache.srwlocks = 0

PHP 7.1 support

$
0
0

Hello DropPhone,

Is PHP 7.1 support planned soon in WinCache ?

The last PHP 7.1 Release Candidate (RC6) will be released on the 10th of November. The final version probablylittleafter.

Thanks ;)

Wincache file caching seems to be causing application errors related to missing files or classes

$
0
0

Hi,

I'm running an open source project EQDKP (eqdkp-plus.eu) on windows with PHP 7 and Wincache 2.0.0.7 which was enabled by default when i installed with the web platform installer.  I did not modify any settings from the defaults.

We are getting errors in our application related to files which actually do exist not being able to be found or classes which exist also not being found. 

The errors come on suddenly after the application has been working for days and go away when the application is restarted manually or automatically.

The EQDKP devs suggested to me that the issue may be related to caching and that is how i discovered that wincache was installed by default.  

Do you agree with their suggestion and if so do you have any idea what could be causing these issues?

Here are the errors we have seen recently:

Message: require_once(): Failed opening required './core/data_handler/includes/modules/read/pdh_r_generic.class.php' 

Message: Uncaught Error: Class 'mmtaskmanager' not found in C:\inetpub\wwwroot\core\registry.class.php:70

Just to emphasize, we are running the stable version of a reasonably popular open source product and the issues do not persist after a restart, so i do tend to agree with the devs that it cannot be a software issue, but has to be some sort of caching issue. But that leaves me in a difficult position for trying to fix it.

For the purposes of debugging, i have enabled a phpinfo to be available if that helps.  http://menddkp.southcentralus.cloudapp.azure.com/phpinfo.php

PHP Startup: wincache: Unable to initialize module

$
0
0

We are running IIS 7.5 and recently upgraded PHP to 7.10.

It now appears that Wincache is having issues. We see many of the following in our logs:

[13-Jan-2017 14:40:18 UTC] PHP Warning: PHP Startup: wincache: Unable to initialize module
Module compiled with module API=20151012
PHP compiled with module API=20160303
These options need to match
in Unknown on line 0

 We have downloaded and re-installed the Wincache DLL with no luck.

Move to Github + AppVeyor CI

$
0
0

The MSSQL Server team has done a great job lately with the MSSQL PDO Extension:

https://github.com/Microsoft/msphpsql

Moving to Github has made colaboration easier.

Also, they setup automatic extension compilation on AppVeyor (free for open source projects), like Tideways did:

https://ci.appveyor.com/project/tideways/php-profiler-extension/history

This "free's" the maintainers from having to build the binaries, as AppVeyor runs the tests and produces compiled binaries as artifacts.

Wincache could benefit doing the same...

Greetings and thanks!!!


reroute_enabled internal cache is not refreshed

$
0
0

This is PHP 5.6 x86

When using reroute_enabled=1, there seems to be an internal cache for functions such as file_exists() and others, but this cache - that I supposed was dependant on the same cache that is used for wincache.fcenabled=1 - seems to be completely unbound.

Take the following script:

$location = "d:\\dump.txt";

wincache_refresh_if_changed([$location]);
clearstatcache();
if (!file_exists($location)) {
  file_put_contents($location, "<?php " . PHP_EOL);
}

file_put_contents($location, "THIS IS A LINE" . PHP_EOL);

return;

What I expect is that if I run this script, then manually delete the d:\\dump.txt file and run it again the call to file_exists() will return FALSE.

If using wincache.fcenabled=1 and reroute_enabled=0 it works as expected. Indeed, you don't even need the call to wincache_refresh_if_changed() or to clearstatcache(), propably the file system is notifying the cache that the file was deleted.

Buf if I use reroute_enabled=1 the nightmare starts. Once the file has been created, file_exists() will always return TRUE even if you manually delete the file from the file system, meaning that the calls to wincache_refresh_if_changed() or clearstatcache() have no effect on whatever internal cache reroute_enabled is using.

I found that if I added unlink() at the end of the script to delete the file (instead of doing this manually) then the internal cache seems to become aware of the fact the the file is being deleted.

But this is confusing....

1. I expect that calling wincache_refresh_if_changed() will refresh whatever internal cache is being used. I would also expect this from clearstatcache() - even if they are different caches. Probably wincache should also  be hooking into clearstatcache().

2. The fact that the documentation states that reroute_enabled=1 routes some function calls through the file cache (the one that is enabled with fcenabled=1) leaves me wondering what does the file cache do when reroute_enabled=0...

3. Wincache is supposed to internally receive file system notifications, so I can't understand why it is not being notified that the file was deleted - or if it is being notified - why is it not clearing/updating the cache used by reroute_enabled.

To make this more confusing, the docs don't make it clear what each cache does, and how do they work together.

WinCache 2.0.0.8 for PHP 7.1 x64

$
0
0

Hello,

I run msi and I gave this notice "phppath property must be set to the directory where php resides". I have set enviroment variable for PHP but nothing. Do you have any ideas?

Thanks

High volume website (Wordpress) hanging

$
0
0

Hello,

I'm wondering if anyone experienced similar issue where Wordpress application with higher viewer volume is hanging in unexpected moments. As far as I know website is returning 500 error. w3wp and php-cgi processes for this website are working but not returning any website content. To fix this situation w3wp process must be restarted/killed (which kills also php-cgi processes) and after this operation website is up and running again. I've experienced this on multiple systems in various PHP versions in total not related Wordpress installations which are using caching plugins. Any thoughts? I'm wondering if this could be caused by WinCache plugin.

Thanks

Virus Total flagging installer as virus

PHP 7.2 and future of WinCache

$
0
0

Hi developers/admins,

PHP 7.2 alpha is out! Any news for WinCache support? Additionally, what is the future of this extension? Has it been abandoned? I haven't been able to find any roadmaps or features in development. This extension greatly improves my site and I hope it will continue to be developed!

Last update was November 2016! What's coming in 2.0.0.9 and beyond?Cool

Viewing all 197 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>