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

Does ttlmax apply to user caching?

$
0
0

So I'm trying to figure out what is going on with my user caching. After keeping an eye on the user cache entries, it seems something is clearing everything out. At first I thought it was the ttlmax setting, but changing it to 0 does not keep entries after a certain amount of inactivity. I suspect it has to do with the Application Pool that PHP is running under. So I guess I really have a few questions;

  1. Does ttlmax apply to user caching? If not;
    1. Is there a WinCache timeout at all which applies to user caching that would clear entries out?
    2. Or are entries kept until the user cache is cleared or the application pool is recycled?
  2. Anyone aware of a any other timeout that would clear entries?
  3. Does the Application Pool have a timeout that would clear WinCache?

EDIT: Another clue, the Cache Uptime continues to be reset after so long of inactivity (for all areas) which again points towards the AppPool...

Thanks for any feedback!


Wincache crashing PHP/w3wp

$
0
0

Hi,

I've been getting the following error for a while now:

Faulting application name: php-cgi.exe, version: 5.4.8.0, time stamp: 0x507dc70e
Faulting module name: php_wincache.dll, version: 1.3.4.0, time stamp: 0x4fd7737e
Exception code: 0xc0000005
Fault offset: 0x0000fd56
Faulting process id: 0xd2c
Faulting application start time: 0x01cdf3d49d7ff8f8
Faulting application path: C:\Program Files (x86)\PHP\v5.4\php-cgi.exe
Faulting module path: C:\Program Files (x86)\PHP\v5.4\ext\php_wincache.dll
Report Id: 0605957f-5ff4-11e2-b622-fa02009a5077

There really aren't any corresponding errors in the php log.  We thought maybe the IIS install was messed up (the server was 4 years old) so we moved the application to a new server and installed both php and wincache via WEBPI.

Can anyone help me troubleshoot this?  It happens somewhat regularly and causes the site to run slow and then finally freeze (possibly when all of the worker processes get hung).

Thank you!

Wincache causing PHP fault

$
0
0

 Hi,

 On our website, we are running IIS 2008 w/ PHP 5.4 and Wincache.

 We see a problem every few hours where the server freezes and displays our 404 error page for any page loaded.  The only way to recover is with an IIS service restart.  The associated error in the event log is:

 

Log Name:      Application
Source:        Application Error
Date:          10/27/2012 7:41:17 AM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      xxxxxx
Description:
Faulting application php-cgi.exe, version 5.4.0.0, time stamp 0x4f4e6d23, faulting module php_wincache.dll, version 1.3.4.0, time stamp 0x4fd7737e, exception code 0xc0000005, fault offset 0x000078d0, process id 0x200, application start time 0x01cdb437f9f04dce.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2012-10-27T11:41:17.000Z" />
    <EventRecordID>54767</EventRecordID>
    <Channel>Application</Channel>
    <Computer>xxxxx</Computer>
    <Security />
  </System>
  <EventData>
    <Data>php-cgi.exe</Data>
    <Data>5.4.0.0</Data>
    <Data>4f4e6d23</Data>
    <Data>php_wincache.dll</Data>
    <Data>1.3.4.0</Data>
    <Data>4fd7737e</Data>
    <Data>c0000005</Data>
    <Data>000078d0</Data>
    <Data>200</Data>
    <Data>01cdb437f9f04dce</Data>
  </EventData>
</Event>

 

This seems to occur more frequently w/ PHP 5.4 instead of PHP 5.3.

 

Does anyone know what we can do to troubleshoot this issue?  In our PHP error logs we see warnings but nothing major.

 

Thank you.

WinCache for PHP 5.5 ?

$
0
0

Hello,

What about WinCache compatibility with PHP 5.5 which will be soon published as stable ?

Anybody has tested PHP 5.5 alpha or beta with WinCache 1.3.4 ? Any updates planned from Microsoft ?

Thanks.

The specified procedure cannot be found

$
0
0

Hello all,

I am running PHP 5.3.24 (also tried 5.3.19) non thread safe.
Actually I see this in my windows log:

Application popup: Warning : PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\v5.3\ext\php_wincache.dll' - The specified procedure could not be found.

Wincache ist not loading. What can be the cause for this?
I am trying to run Wincache 1.3.4.1 on Windows Server 2012 Standard (not Core, with UI).

 

Best regards,
Mark

WinCache dosn't work with multiple application pools

$
0
0
I have several websites in the IIS, and each one using a separate application pool. But wincache only work with one of them. What can I do to enable the wincache to the other application pools?

Wincache and sessions : "Failed to write session data"

$
0
0

Hi,

Config : Windows Server 2003 SP2 + IIS 6.0 + PHP 5.3.6 + FastCGI 1.5 + WinCache 1.1

 

I use the wincache session handler ( session.save_handler = wincache ) since the avaibility of WinCache 1.1 on January 2010 without any problem.

 

This morning I have had a problem. My PHP scripts which create sessions to login to my private interface didn't work while I didn't change anything to this code since several years.

 

I have restarted IIS (iisreset) but same thing, impossible to create sessions with PHP.

 

I looked the PHP log file and then I saw the following line :

 

PHP Warning:  Unknown: Failed to write session data (wincache). Please verify that the current setting of session.save_path is correct (C:\Temp\) in Unknown on line 0 

 

I didn't change the C:\Temp directory and it is well writable for the IIS users.

 

Then I have disabled the wincache handler for PHP sessions in the php.ini file (set it to "files") and my sessions work again now. I have then set session.save_handler to wincache and it's rerun fine now....

 

Any idea what happened ? And Why the restart of IIS didn't solve this crash of the wincache sessions handler ?

 

Thanks.

Any compatile version of winchache with php-5.4.15 out there?

$
0
0

As the title says's Wink

Is there a Wincache out there that is compatible with php-5.4.15?

I'we been looking but it hard to find any info!

Thanks!


HELP - cant install Windows Cache Extension 1.3 for PHP 5.3

$
0
0

Hi guys,

am trying to install joomla on our server and one of the dependencies is Windows Cache Extension 1.3 for PHP 5.3

However after installing all the depndencies, when I try to install Windows Cache Extension 1.3 for PHP 5.3, It says successful, but never installs. I am able to install on IIS EXPRESS and version 5.4 but somehow version 5.3 does not work. Which is the requirement for website panel

see attachment 

Please advise

many thanks

Ehi

Wincache crashing PHP

$
0
0

Hi,

We have been getting the following error in our web Servers (Windows 2008 R2 SP1 , IIS 7)

Faulting application php-cgi.exe, version 5.3.8.0, faulting module 4e537f4b, version php_wincache.dll, fault address 0x1.1.630.0.

Faulting application php-cgi.exe, version 5.3.8.0, faulting module 4e537f4b, version unknown, fault address 0x0.0.0.0.

Faulting application php-cgi.exe, version 5.3.8.0, faulting module 4e537f4b, version kernel32.dll, fault address 0x6.1.7601.17932.

It happens somewhat regularly and causes the server performance to degrade and then finally gets down

until we restart IIS as a temporal fix for this issue.

Any help will be appreciated.

Thanks,

Kristell

Question about implementation of WinCache beyond basic install

$
0
0

 We have recently starting using WinCache and NTS PHP 5.2.17 for one of our very large sites.  Other than the basic installation, I'm trying to understand how this extension can be used further.

  •  Is there any sort of documentation for  use with PHPBB2?
  • Regarding the usercache, can someone clarify if it can be used for such a thing

Example:  Say a PHP page has the following query

 

 $sql = "SELECT f.forum_id, f.cat_id, f.forum_name, f.forum_desc, f.forum_status, f.forum_order, f.forum_posts, f.forum_last_post_id, f.forum_last_post_time, f.auth_view, f.forum_icon, f.forum_parent
                FROM ( " . FORUMS_TABLE . " f)
                
                ORDER BY f.cat_id, f.forum_order";

        if ( !($result = $db->sql_query($sql)) )
        {
            message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
        }


      $forum_data = $db->sql_fetchrowset($result);

Could the results of this query as $forum_data be added to the usercache?  If so, how could they be retrieved and be made available on future page loads?  We currently have the ability to write the result (it can be rather large) to a file (serialized) and read the file for the $forum_data on future page loads.

 Thank You

WinCache 1.3.5 release on SourceForge

$
0
0

The IIS team has published the release version of WinCache Extension 1.3.5 for PHP 5.5.  This is the latest stable and production ready version of the extension for PHP 5.5.

Installation using the Web Platform Installer is easiest, as it will automatically place the extension binary into proper location and will update the PHP configuration to enable the extension. Also, if you have the previous version of the extension installed, then Web PI will upgrade it. If you install any PHP 5.5 application by using Web PI, the WinCache Extension 1.3.5 for PHP will be offered as an optional component.

If you install the extension manually, then follow the instructions at Installing/Configuring WinCache for PHP.

Notes

  • In PHP 5.5, the Zend Opcache extension is now in the core PHP product, although the extension is not loaded by default.  To load the Zend Opcache extension, ensure the following line is included in the php.ini file:
zend_extension=php_opcache.dll
[opcache]
opcache.enable=1

 

  • Since the Zend Opcache extension is now in the core PHP product, the WinCache opcode cache is disabled by default.  The opcode cache portion of WinCache is now deprecated, and will be removed in a future release of the WinCache extension.
  • There was a bug that caused an Access Violation (AV) on shutdown, when both the Zend Opcache extension and the WinCache extension were loaded, AND both extensions were enabled for CLI use.  An updated version of the Zend Opcache extension is available in PHP 5.5.2.  It is strongly recommended that customers use PHP 5.5.2 or later when using the WinCache Extension 1.3.5 for PHP 5.5. Installation of WinCache Extension 1.3.5 for PHP 5.5 using the Web Platform Installer will install PHP 5.5.2 or later.
  • The extension can only be used with non-thread-safe builds of PHP
  • The extension can only be used when IIS is configured to run PHP via FastCGI
  • The WinCache Extension 1.3.5 for PHP 5.5 can only be used with the x86 VC11 build of PHP 5.5.

Thanks!

The IIS team thanks all of you who have installed and tried early releases of the WinCache extension and provided us with feedback, bug reports and feature suggestions through theWindows Cache Extension for PHP Forum. Your involvement throughout the release process has been very valuable to us and really helped us make this a great release!

WinCache User Caches Expire Prematurely

$
0
0

I posted on the FastCGI forum last week, but I did not get any pertinent feedback.  Luckily, I found this forum for WinCache, so I figured I'd give it another go.  I am trying to resolve user caches expiring prematurely.

In a 2009 article on iis.net, "Use the Windows Cache Extension for PHP" discussed only three types of WinCache caches for this IIS extension.  The WinCache user cache functionality was not addressed.  I wonder if perhaps that is because the user caching is not relialbe?

It is my understanding that user cache ttl is independent of the ttl setting for WinCache in php.ini, and that somehow fastcgi is terminating idle threads, thus prematurely wiping out user cache regardless of the ttl set for user cache in PHP.  Is there a workaround for this?  I tried extending the IdleTimeout setting in fastcgi in the iis console, but this has not been successful.  Any help would be greatly appreciated.

Win 2008 R2,

IIS 7,

WinCache 1.3.4.0 ,

PHP ver 5.3 VC9 NTS,

wincache 1.3.4 vc9 session_start(): Cannot find save handler 'wincache' - session startup failed PHP 5.3

$
0
0

Hi,

I'm using wincache 1.1 for a long time now. I tried to upgrade it to 1.3.4 vc9 but I get session_start(): Cannot find save handler 'wincache' - session startup failed errors. I'm using PHP 5.3.

Also When I call wincache.php it says wincache is not loaded.

I could not find any info about this issue. What might be the problem?

Thanks,

Wincache: How do you increase cache size?

$
0
0

Hello everyone,

Some questions; (i'm a newbee though )

1) How do you configure wincache to use max cache size  - I'm just having the default of 8 megabytes and I do not know how to change it. 

2) What is the max size of the cache size? (I have read 85 megabytes somewhere, is that correct?)

3) How do you control the settings for winache . there is no ini file or anything that comes along in the zip installation file. Is it done though the php.ini file?

I've been googling a lot on the subject, but haven't really found anything about the subject except for the configuration settings table here on iis.net - but that is like reading Chinese me since there is not really any explanation on how to do it and where..Undecided

All help and guidance in the right direction much appreciated!

Thanks!


MySQL connection string

$
0
0

i want to create a connection to a MySql database,my connection string is 

sConnection = "DRIVER={MySQL ODBC 5.2 Driver}; SERVER=localhost; DATABASE=dbname; UID=root;PASSWORD=root; PORT:3306; OPTION=3" 

when i am trying to connect i am getting this error 

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/thomsonreuters_v2/v3test/conn-1.asp, line 10

Can some one help me out in this.


Thaks in advance. 

session expire unexpectedly

$
0
0

When session.save_handler is set to wincache,and a new session is accessed frequently,but this session still expired when session.gc_maxlifetime is reached,meanwhile dup entries can be found in wincache.php's session cache page.

Win 2003 R2,IIS 6,Wincache 1.3.5,PHP 5.3.13 VC9 NTS

I read partial source code,and made a patch as I possible.

diff -uNr WINCACHE-1.3.5.0.bak/wincache_zvcache.c WINCACHE-1.3.5.0/wincache_zvcache.c
--- WINCACHE-1.3.5.0.bak/wincache_zvcache.c     2013-10-05 20:03:07.000000000 +0800
+++ WINCACHE-1.3.5.0/wincache_zvcache.c 2013-10-08 13:32:46.000000000 +0800
@@ -1062,10 +1062,11 @@
     {
         if(strcmp(pcache->zvmemaddr + pvalue->keystr, key) == 0)
         {
+        /*
             if(pvalue->ttlive > 0)
             {
-                /* Check if the entry is not expired and */
-                /* Stop looking only if entry is not stale */
+                / * Check if the entry is not expired and * /
+                / * Stop looking only if entry is not stale * /
                 tdiff = utils_ticksdiff(0, pvalue->add_ticks) / 1000;
                 if(tdiff <= pvalue->ttlive)
                 {
@@ -1074,9 +1075,11 @@
             }
             else
             {
-                /* ttlive 0 means entry is valid unless deleted */
+                / * ttlive 0 means entry is valid unless deleted * /
                 break;
             }
+        */
+            break;
         }
 
         pvalue = ZVCACHE_VALUE(pcache->zvalloc, pvalue->next_value);
@@ -1366,7 +1369,7 @@
             }
 
             /* Remove the entry from cache if its expired */
-            tickdiff = utils_ticksdiff(ticks, ptemp->add_ticks) / 1000;
+            tickdiff = utils_ticksdiff(ticks, ptemp->use_ticks) / 1000;
             if(tickdiff >= ptemp->ttlive)
             {
                 remove_zvcache_entry(pcache, sindex, ptemp);

 

Wincache Ucache - Sudden Performance Problems

$
0
0

Suddenly, this morning, with no apparent changes on our end, Wincache Ucache is hanging up and causing requests to time out. I've confirmed this is the issue, by disabling and enabling wincache.ucache_enabled repeatedly. It doesn't happen automatically, but instead runs fine for between 2 hours and 20 minutes and then begins time time out on wincache_ucache_set and wincache_ucache_get (although set seems to be worse than get.)

Plenty of memory available: 908MB of 930MB available.

wincache,how to set cache higher?

PhpWinCache Error (stops working after some time)

$
0
0
Hi

Recently launched a new version of our site but then wincache stopped working. PHP version is the same, 5.3.8. Wincache 1.2.1208.0. It works for a few hours but then fails. The site loads forever and then this sort of event message is generated. Restarting the server solves the problem.

It worked fine before. We're using some more caching but not heavily. It typically uses only 10 MB of 85 MB limit. The namesalt is set to some random string.

No cache fixes the problem. It seems to be the ucache and not ocache which breaks stuff.

It's probably related to heavy pressure on cache get/set methods. When i run some scripts which does use cache heavilly, it breaks, while it can last for a couple of hours with low traffic, a couple of page views per second. It is nowhere near the memory limits.

** Warning

A process serving application pool 'Tonerweb.no' suffered a fatal communication error with the Windows Process Activation Service. The process id was '4340'. The data field contains the error number.

Data Field: 8007006D

** Application Error Event
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp: 0x4ce7c8f9
Exception code: 0xc0000005
Fault offset: 0x000000000004e4b4
Faulting process id: 0x10f4
Faulting application start time: 0x01cd0e530c0c46d0
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 9f799640-7ac1-11e1-a1ed-862b2c6947fb
Viewing all 197 articles
Browse latest View live


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