php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59284 Setting wincache as session handler causes E_WARNINGS in wincache.php
Submitted: 2010-06-28 07:40 UTC Modified: 2010-06-28 19:09 UTC
From: RQuadling at GMail dot com Assigned:
Status: Closed Package: WinCache (PECL)
PHP Version: 5_3 SVN-2010-06-28 (dev) OS: Windows XP SP3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
1 + 14 = ?
Subscribe to this entry?

 
 [2010-06-28 07:40 UTC] RQuadling at GMail dot com
Description:
------------
Setting ...

session.save_handler = wincache

on an IIS7 with FastCGI

Loading wincache.php results in 2 header warnings ...

Warning: session_start() [function.session-start.html]: 
Cannot send 
session cookie - headers already sent by (output started at 
D:\Web 
Sites\All Sites\wincache.php:814) in D:\Web Sites\All 
Sites\wincache.php on line 630

Warning: session_start() [function.session-start.html]: 
Cannot send 
session cache limiter - headers already sent (output started 
at D:\Web 
Sites\All Sites\wincache.php:814) in D:\Web Sites\All 
Sites\wincache.php on line 630

I have a patch which should do the trick, but essentially 
changing ...

Index: wincache.php
============================================================
=======
--- wincache.php	(revision 300801)
+++ wincache.php	(working copy)
@@ -622,8 +626,6 @@
         $ucache_info = wincache_ucache_info();
     }
     if ( $session_cache_available && ( $cache_data == 
SUMMARY_DATA || 
$cache_data == SCACHE_DATA ) ){
-        @session_name('WINCACHE_SESSION');
-        session_start();
         $scache_mem_info = wincache_scache_meminfo();
         $scache_info = wincache_scache_info();
     }
@@ -635,6 +637,11 @@
     exit;
 }
 
+if ( $session_cache_available ){
+    session_name('WINCACHE_SESSION');
+    session_start();
+}
+
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 
Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">






Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-28 19:09 UTC] ruslany at microsoft dot com
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

Thanks for reporting this and for providing the patch.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC