php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37271 Dynamic loading of modules
Submitted: 2006-05-02 07:14 UTC Modified: 2006-05-24 22:02 UTC
From: bhoehl at linotype dot com Assigned:
Status: Not a bug Package: SOAP related
PHP Version: 5.1.3 OS: Redhat ES4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
2 + 50 = ?
Subscribe to this entry?

 
 [2006-05-02 07:14 UTC] bhoehl at linotype dot com
Description:
------------
I am writing a soap server which shall use dynamically loaded modules ( like dl('.../mymodule.so' ).
Loading this module works so far and produces no error.
Accessing the function supplied by this module causes
an error telling that this function is not available in the
SOAP module.
It looks like PHP or SOAP causes the function mapper to look only in the SOAP module for the new function.

I can "work around" this bug by putting my modules.so in php.ini. So my the supplied function is found inside the 
soap callback.

Reproduce code:
---------------
<?php

// base64Binary

function getCustomizedFont($symbol) {
  return confirm_customize_font_compiled('xxxxxxx') ;
}


if(!extension_loaded('customize_font')) {
        dl('../../../../root/php-5.1.2/ext/customize_font/.libs/customize_font.' . PHP_SHLIB_SUFFIX);
}


ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
$server = new SoapServer("customizeFont.wsdl");
$server->addFunction("getCustomizedFont");
$server->handle();

?>


Expected result:
----------------
Congratulations! You have successfully modified ext/customize_font/config.m4. Module customize_font is now compiled into PHP.


Actual result:
--------------
PHP Fatal error:  Uncaught SoapFault exception: [SOAP-ENV:Server] Call to undefined function confirm_customize_font_compiled() in /root/php-5.1.2/ext/customize_font/client.php:4
Stack trace:
#0 [internal function]: SoapClient->__call('getCustomizedFo...', Array)
#1 /root/php-5.1.2/ext/customize_font/client.php(4): SoapClient->getCustomizedFont('ibm')
#2 {main}
  thrown in /root/php-5.1.2/ext/customize_font/client.php on line 4


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-24 22:02 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Sep 21 00:01:27 2019 UTC