php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58089 missing ifdef in memcache_session.c
Submitted: 2008-03-08 10:14 UTC Modified: 2008-04-16 16:07 UTC
From: guenter@php.net Assigned:
Status: No Feedback Package: memcache (PECL)
PHP Version: 5_2 CVS-2008-03-08 OS: irrelevant
Private report: No CVE-ID: None
 [2008-03-08 10:14 UTC] guenter@php.net
Description:
------------
In php_memcache.h line 171ff we have:
/* session handler struct */
#if HAVE_MEMCACHE_SESSION
#include "ext/session/php_session.h"

extern ps_module ps_mod_memcache;
#define ps_memcache_ptr &ps_mod_memcache

PS_FUNCS(memcache);
#endif

If HAVE_MEMCACHE_SESSION is not 1 then compilation of memcache_session.c breaks. Therefore I'd suggest to block the code here too with '#if HAVE_MEMCACHE_SESSION':

--- memcache_session.c.orig	Tue Feb 05 20:46:52 2008
+++ memcache_session.c	Sat Mar 08 15:56:18 2008
@@ -23,6 +23,8 @@
 #include "config.h"
 #endif
 
+#if HAVE_MEMCACHE_SESSION
+
 #include <ctype.h>
 #include "php.h"
 #include "php_ini.h"
@@ -233,6 +235,8 @@
 	return SUCCESS;
 }
 /* }}} */
+
+#endif /* HAVE_MEMCACHE_SESSION */
 
 /*
  * Local variables:



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-17 14:16 UTC] mikael at synd dot info
Why is this necessary? config.m9 already has provisions for not compiling memcache_session.c if session support is disabled. Besides, the patch above breaks my compile with a non-obvious 

/home/mikl/arch/head/src/php-4.4.7/ext/memcache/memcache.c:266: undefined reference to `ps_mod_memcache'
 [2008-04-16 16:07 UTC] mikael at synd dot info
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC