Bug #74293 [Fbk->NoF]: Order of extensions loaded in php.ini affects function calls

From: Date: Sun, 20 Aug 2017 04:22:26 +0000
Subject: Bug #74293 [Fbk->NoF]: Order of extensions loaded in php.ini affects function calls
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210748@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74293&edit=1 ID: 74293 Updated by: php-bugs@lists.php.net Reported by: yukiwongky at gmail dot com Summary: Order of extensions loaded in php.ini affects function calls -Status: Feedback +Status: No Feedback Type: Bug Package: Dynamic loading Operating System: Darwin PHP Version: 7.1.3 Private report: N New Comment: 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 "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2017-04-02 01:50:58] ab@php.net Seems Nikita's guess is exactly what happens. There maybe several scenarios, but all are related to the actual linker and loader process. For example the loader might only use the first refered symbol it finds, if the DSOs export duplicated symbols. Another situation, if some DSO was linked the way, that some library overrides symbols in the object files. The symbol in the signature you show should not be exported, however it could happen if compiler does it by default. It is quite possible, that the system loader will only use the symbol encountered first. The extensions are not the core PHP extensions, so it doesn't look like a core bug. I'd suggest first to consult your compiler documentation and ensure the symbols not explicitly exported are kept private in the binaries. Thanks. ------------------------------------------------------------------------ [2017-03-22 20:10:10] yukiwongky at gmail dot com The examples I found in the sqlsrv and pdo_sqlsrv extensions are: sqlsrv_error_const* get_error_message(unsigned int sqlsrv_error_code); struct stmt_option_ss_scrollable : public stmt_option_functor { virtual void operator()( sqlsrv_stmt* stmt, stmt_option const* /*opt*/, zval* value_z TSRMLS_DC ); }; ------------------------------------------------------------------------ [2017-03-22 19:53:41] nikic@php.net What linkage and visibility does your C function use? (If you don't know, can you paste the complete function signature, including any attributes before it?) ------------------------------------------------------------------------ [2017-03-22 19:48:34] yukiw at simba dot com he C functions that my extension defines ------------------------------------------------------------------------ [2017-03-22 19:42:28] nikic@php.net When you say "function", are you referring to PHP functions registered by your extension, or to C functions that your extension defines? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=74293 -- Edit this bug report at https://bugs.php.net/bug.php?id=74293&edit=1

« previous php.bugs (#210748) next »