Bug #17977: session can't be built shared with PHP
| From: | list at firehawksystems dot com | Date: | Tue, 25 Jun 2002 17:45:16 +0000 |
| Subject: | Bug #17977: session can't be built shared with PHP | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-12064@lists.php.net to get a copy of this message | ||
From: list@firehawksystems.com
Operating system: FreeBSD 4.3, but any unix
PHP version: 4.2.1
PHP Bug Type: *Compile Issues
Bug description: session can't be built shared with PHP
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 bug report at http://bugs.php.net/?id=17977&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17977&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17977&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17977&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17977&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17977&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17977&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17977&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17977&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17977&r=globals