Heh, too bad I remembered this mail after spending some hours
    trying to get php4 + php5 work as DSO on same apache. :)
    I have both enabled now and it actually works. 
    (used libtool 1.5 and had to patch sapi/apache/mod_php5.c a bit)
        
    Anyway, the issue with shared modules exists, or rather, shows
    up now clearly. You just can't have them with 'versioned' DSO module.
    
    The patch seems okay, but it might be good to disable the loading of 
    shared extensions always when '--enable-versioning' is used
    so users get a more descriptive error, something like what you
    get when the OS doesn't support it:
    
      "Cannot dynamically load %s - dynamic modules are not supported"
    
    This would prevent some queries when people try to load some extensions
    they didn't compile themselves, or did it with phpize way.

    And if we want to support running both php4 + php5 on same apache as DSO, 
    we need to rename some stuff in sapi/apache and also update the bundled 
    libtool to 1.5. (and also update it at the snapshot/release generation machine.)

    Unfortunately this means that we'd have to start using autoconf 2.5x now
    since the new libtool requires it. And for some reason, it's really slow
    in creating our configure compared to autoconf 2.13..and the generated
    configure itself is slow in running too. We propably also have to 
    update our configure stuff to the 2.5x era..

    An alternative for all this upgrading is of course to patch our libtool.m4's
    with this patch:
    
       http://mail.gnu.org/archive/html/libtool/2002-07/msg00029.html
     
    That worked fine too..and might be the better solution out of 2 bad ones. :)


    The 3rd solution for all this: Let's remove --enable-versioning altogether as
    it seems to cause more problems than what it actually solves.
    After all, it's much safer to just run separate Apache's..or have either
    version configured as CGI binary.
    
    --Jani
    
    
        

On Thu, 16 Oct 2003, Joe Orton wrote:

>--enable-versioning requests that the linker just exports certain
>entries in the dynamic symbol table; this is not compatible with 
>the use of shared modules, which requires that the SAPI exports all
>its symbols, zend_* and so on, otherwise modules can't use them.
>
>This combination will not have worked for ages on platforms such as
>Solaris and AIX, where libtool 1.4 implements -export-symbols correctly;
>also on Linux with libtool 1.5 (where before, -export-symbols was
>in effect a noop).
>
>Index: configure.in
>===================================================================
>RCS file: /repository/php-src/configure.in,v
>retrieving revision 1.396.2.80
>diff -u -r1.396.2.80 configure.in
>--- configure.in       7 Oct 2003 10:04:51 -0000       1.396.2.80
>+++ configure.in       16 Oct 2003 09:00:11 -0000
>@@ -765,6 +765,9 @@
> dnl -------------------------------------------------------------------------
> 
> if test "$PHP_VERSIONING" = "yes"; then
>+  if test -n "$PHP_MODULES"; then
>+    AC_MSG_ERROR([--enable-versioning cannot be used with shared modules])
>+  fi
>   test -z "$PHP_SYM_FILE" && PHP_SYM_FILE="$abs_srcdir/sapi/$PHP_SAPI/php.sym"
>   if test -f "$PHP_SYM_FILE"; then
>     EXTRA_LDFLAGS="-export-symbols $PHP_SYM_FILE $EXTRA_LDFLAGS"
>
>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to