memcache fast-cgi php apache 2.2 windows 7创build问题

我正试图在windows 7机器上运行memcache,fast-cgi与apache 2.2 + php。 如果我不使用memcache一切正常。

在php.ini中禁用extension=php_memcache.dll的一切都恢复正常。

一旦我开始Apache,Apache日志说:

 [Wed Jan 12 18:19:23 2011] [notice] Apache/2.2.17 (Win32) mod_fcgid/2.3.6 configured -- resuming normal operations [Wed Jan 12 18:19:23 2011] [notice] Server built: Oct 18 2010 01:58:12 [Wed Jan 12 18:19:23 2011] [notice] Parent: Created child process 412 [Wed Jan 12 18:19:23 2011] [notice] Child 412: Child process is running [Wed Jan 12 18:19:23 2011] [notice] Child 412: Acquired the start mutex. [Wed Jan 12 18:19:23 2011] [notice] Child 412: Starting 64 worker threads. [Wed Jan 12 18:19:23 2011] [notice] Child 412: Starting thread to listen on port 80. 

和访问页面后(该页面只有echo phpinfo() )我得到这个error.log中的错误:

 [Wed Jan 12 18:20:54 2011] [warn] [client 127.0.0.1] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error [Wed Jan 12 18:20:54 2011] [error] [client 127.0.0.1] Premature end of script headers: index.php 

我有我的ext目录php_memcache.dll和httpd.conf是这样的:

 LoadModule fcgid_module modules/mod_fcgid.so FcgidInitialEnv PHPRC "c:/php" FcgidInitialEnv PATH "c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;" FcgidInitialEnv SystemRoot "C:/Windows" FcgidInitialEnv SystemDrive "C:" FcgidInitialEnv TEMP "C:/WINDOWS/Temp" FcgidInitialEnv TMP "C:/WINDOWS/Temp" FcgidInitialEnv windir "C:/WINDOWS" FcgidIOTimeout 64 FcgidConnectTimeout 32 FcgidMaxRequestsPerProcess 500 <Files ~ "\.php$>" AddHandler fcgid-script .php FcgidWrapper "c:/php/php-cgi.exe" .php </Files> 

所以问题必须与memcache相关,因为如果我禁用它,fast-cgi似乎工作正常。 有没有任何可能的原因呢?

memcache服务正在运行…我可以通过控制面板 – >服务来检查它。

手动运行PHP(findphp.exe并双击它)。 经常发生的是,由于某种原因,PHP无法加载扩展,并试图popup消息框告诉你这一点。 由于没有人看到消息框作为服务运行时,没有人知道发生了什么。

我得到了它的工作。 问题是与版本的DLL和PHP版本。 我升级了PHP到5.3,现在没事了。

您还必须小心线程安全和非线程安全的版本…任何不兼容性不会让您运行memcache。