Hmm, interesting.

The order comes from the order that the extension dirs are sorted
in by the glob() function (so, yes it's alphabetical).

I have some dependency based ordering code for shared extensions
under the win32 build, so I could adapt that for the internals_functions.c
stuff, but we would still have the same problem under Linux.

--Wez.

----- Original Message ----- 
From: "Blake Schwendiman" <[EMAIL PROTECTED]>
To: "'Marcus Boerger'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, January 08, 2004 8:14 PM
Subject: [PHP-DEV] SPL not Working (was: SimpleXML and Default Cast To
String)


> Hello Marcus,
>
> Okay.  I tracked it down.  I am using the new build system so that spl
> gets compiled in.  However, the problem is that simplexml is getting
> initialized before spl and simplexml needs the interface for spl to be
> initialized first.
>
> I found that the order of module initialization is stored in
> main/internal_functions.c.  Here is mine:
>
> zend_module_entry *php_builtin_extensions[] = {
> phpext_bcmath_ptr,
> phpext_calendar_ptr,
> phpext_com_dotnet_ptr,
> phpext_ctype_ptr,
> phpext_dom_ptr,
> phpext_ftp_ptr,
> phpext_iconv_ptr,
> phpext_libxml_ptr,
> phpext_odbc_ptr,
> phpext_pcre_ptr,
> phpext_session_ptr,
> phpext_simplexml_ptr,
> phpext_spl_ptr,
> phpext_sqlite_ptr,
> phpext_standard_ptr,
> phpext_tokenizer_ptr,
> phpext_wddx_ptr,
> phpext_xml_ptr,
> phpext_zlib_ptr,
> };
>
> This file is created by the configure.js script.  If I manually edit the
> file to put the spl extension _before_ the simplexml then recompile
> everything works fine.
>
> It appears that configure is sorting the extension list alphabetically
> before generating the above entries.  I don't know if this is also the
> case on Linux (or other unixish).  If the entries were not alphabetical,
> but based on the order passed to the configure.js, then the builder
> could simply change the order on the configuration command line.
>
> This makes me wonder if there are other new order dependencies now that
> interfaces are a part of PHP.
>
> Blake Schwendiman
>
> -----Original Message-----
> From: Marcus Boerger [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 08, 2004 12:42 PM
> To: Blake Schwendiman
> Subject: Re: [PHP-DEV] SimpleXML and Default Cast To String
>
> Hello Blake,
>
> are you compiling with the new or the old build system?
> I used the new one. And there spl was compiled into the
> exe. So that's what you need to do and i obviously need
> to disallow relying on spl in sxe when spl is compiled
> shared -> done.

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

Reply via email to