Bug #17977 Updated: session can't be built shared with PHP

From: Date: Fri, 28 Jun 2002 02:45:53 +0000
Subject: Bug #17977 Updated: session can't be built shared with PHP
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12295@lists.php.net to get a copy of this message
ID: 17977 Updated by: sniper@php.net Reported By: list@firehawksystems.com -Status: Open +Status: Closed Bug Type: *Compile Issues Operating System: FreeBSD 4.3, but any unix PHP Version: 4.2.1 New Comment: This bug has been fixed in CVS. You can grab a snapshot of the CVS version at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-06-25 13:45:15] list@firehawksystems.com I have been trying to build session support as a shared extension and here is what I have found. It works fine if you us the phpize, ./configure, make method, but if you try building it shared while building PHP it will not work. ./configure --with-layout=GNU --enable-session=shared --with-mm=shared <snip> (it works) make <snip>(while compiling main/internal_functions.c) internal_functions.c:47: `phpext_ps_mm_ptr' undeclared here (not in a function) internal_functions.c:47: initializer element is not constant internal_functions.c:47: (near initialization for `php_builtin_extensions[6]') --- internal_functions.c --- zend_module_entry *php_builtin_extensions[] = { phpext_xml_ptr, phpext_standard_ptr, phpext_posix_ptr, phpext_pcre_ptr, phpext_mysql_ptr, phpext_ctype_ptr, phpext_ps_mm_ptr, }; It seems that phpext_ps_mm_ptr gets added if --with-mm or --with-mm=shared is set. Adding it with --with-mm=shared is bad as it is not needed and doesn't include the right headers for that function anyway. I have created a patch to fix this, but wanted to make sure this was the best way to fix it. Is there a better way? Comments? Thanks, Brian BTW, ./configure --with-layout=GNU --enable-session=shared --with-mm=no and ./configure --with-layout=GNU --enable-session=shared --without-mm will not build it shared either, but I am not worried about that. ---------------- Patch --- php-4.2.1/configure Mon Jun 24 14:15:58 2002 +++ php-4.2.1/configure Mon Jun 24 14:16:36 2002 @@ -57197,9 +57197,9 @@ #define HAVE_LIBMM 1 EOF - - EXTRA_MODULE_PTRS="$EXTRA_MODULE_PTRS phpext_ps_mm_ptr," - + if test "$ext_shared" != "yes"; then + EXTRA_MODULE_PTRS="$EXTRA_MODULE_PTRS phpext_ps_mm_ptr," + fi fi if test "$PHP_SESSION" != "no"; then ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17977&edit=1

« previous php.bugs (#12295) next »