IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

domxml_open_mem() function undefined.

  • 1.  domxml_open_mem() function undefined.

    Posted Fri December 05, 2003 07:24 PM

    Hi Taminoes,

    I don’t have any idea what is wrong in TaminoAPI.php which has generated this error when I trying to execute the example01.php (from Tamino PHP API demo)

    “Fatal error: Call to undefined function: domxml_open_mem() in C:\DADOS\ctfei\htm\gce\demos\php\TaminoAPI.php on line 787”

    The line 787 of TaminoAPI.php is:

    784 function createResultDom()
    785 {
    786 if ($this->_bResultDomCreated == false) {
    787 $this->_domResultBody = domxml_open_mem($this->_sResultBody);
    788 $this->_bResultDomCreated = true;
    789 }
    790 }

    Could you give me some hints?

    Regards, Ito


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 2.  RE: domxml_open_mem() function undefined.

    Posted Mon December 08, 2003 10:07 AM

    Hi,

    Check your php.ini file (should be in the %SystemRoot% directory) - there should be a line for loading in the DOMXML extension:

    ;extension=php_domxml.dll

    which will need uncommenting.

    Hope this helps.

    Stuart Fyffe-Collins
    Software AG (UK) Ltd.


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods


  • 3.  RE: domxml_open_mem() function undefined.

    Posted Fri January 09, 2004 02:14 PM

    Hi,

    After uncommenting the php_domxml.dll I still get a similar message:

    A pop-up with the folowing text:

    unknown(): Unable to load dynamic library ‘./php_domxml.dll’ - The specified module could not be found

    And a message from the PHP processor

    Fatal error: Call to undefined function: domxml_open_mem() in c:\inetpub\wwwroot\opportunity\classes\TaminoAPI.php on line 787
    PHP Warning: Unknown(): Unable to load dynamic library ‘./php_domxml.dll’ - The specified module could not be found. in Unknown on line 0


    I’ve got a php_domxml.dll in C:\PHP , in C:\PHP\extensions and in C:\Windows\System32\ None of them seem to work. I’m pretty sure I don’t need to try copying php_domxml.dll to the path where the TaminoAPI.php resides.

    On php.net I found some references to the iconv.dll or the php_iconv.dll that also have something to do with domxml… But these dlls also don’t fix the problem


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods


  • 4.  RE: domxml_open_mem() function undefined.

    Posted Fri January 09, 2004 03:55 PM

    Hello,

    the only dll that php_domxml.dll requires is php4ts.dll. From Apache the php plugin should load this dll:-

    #… in Apache’s httpd.conf file…
    LoadFile “D:\PHP\php4ts.dll”
    LoadModule php4_module “D:\php\sapi\php4apache.dll”
    AddType application/x-httpd-php .php .phtml

    The only other thing I can think of to check is the php.ini has a directive saying which directory to find the extensions:-

    ; … in php.ini …
    extension_dir = d:\php\extensions

    If neither of these things help then I would suggest raising the question on one of the PHP forums as the problem you have is specific to PHP :slight_smile:

    One final thing : I use PHP version 4.3.1, and Apache v1.3.

    best regards,

    Stuart Fyffe-Collins
    Software AG (UK) Ltd.


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 5.  RE: domxml_open_mem() function undefined.

    Posted Tue January 13, 2004 12:17 PM

    I’ve solved the problem. It seems to have something to do with the new PHP version that I am using (PHP 4.3.4 Win32 binary was my first installation on this machine)… I also needed the libxml2.dll that was not mentioned in the PHP documentation for PHP 4.3.4 (but for older versions it was)

    Here’s the entire process:
    1) download the PHP-Win32 binary installation from www.php.net
    2) download the PHP-Win32 ZIP package that contains all dll’s , extensions, APIs and stuff from www.php.net
    3) Install PHP binary to c:\PHP
    4) unzip the ZIP package to c:\PHP (you should see more subdirectories now)
    4a) add the following lines to your Apache httpd.conf file:
    LoadModule php4_module c:/php/sapi/php4apache2.dll
    AddType application/x-httpd-php .php

    The c:/php/sapi/php4apache2.dll was contained in the PHP Win32 ZIP file that you extracted in step 2
    5) open php.ini in C:\WINDOWS
    6) in php.ini locate the extension path and change the line extension_dir = “./” to
    extension_dir = “C:\PHP\extensions”
    7) in php.ini locate the line ;extension=php_domxml.dll and remove the ; sign
    8) copy iconv.dll from c:\php\dlls to c:\windows\system32
    9) download domxml.zip from http://www.firepages.com.au/public/domxml.zip
    10) copy the libxml2.dll from domxml.zip to c:\windows\system32
    11) The php_domxml.dll should already exist in your c:\php\extensions directory (was also contained in PHP Win-32 ZIP file in step 2)
    12) stop and restart your Apache / IIS


    Cheers!


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods


  • 6.  RE: domxml_open_mem() function undefined.

    Posted Wed January 05, 2005 12:17 PM

    Hi Ferry
    After following your procedure…I still get the message Fatal error: Call to undefined function: domxml_open_mem() in C:\Program Files\Apache Group\Apache2\htdocs\TaminoAPI.php on line 884.
    Please help and if u could tell me what exactly to do with TaminoAPI.Should I unzip it to the htdocs apache conf?Thats what I did!Not sure about it though
    Cheers
    Kay

    Arsenal are the best!


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 7.  RE: domxml_open_mem() function undefined.

    Posted Wed January 05, 2005 12:25 PM

    Hi Ferry
    Why do I have to install PHP twice?There is the zip package and the installer.Are you saying I should use both?
    Thanks
    Kay

    Arsenal are the best!


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 8.  RE: domxml_open_mem() function undefined.

    Posted Thu January 06, 2005 09:24 AM

    Kay,

    Yes! You should use both (step 1-4)

    It’s not the Tamino API that’s the bugger here. It’s PHP itself: If you only use the Windows binary installer you get a minmum installation that only contains windows specific stuff (dlls etc.) but lacks parts of XML support etc. That’s why (on Windows) you need to install the binary windows version and then unzip the ZIP-package to the same dir. The ZIP-package contains all ‘missing’ stuff. In this way you get a fully working PHP-installation.

    Bergkamp is the best! :wink:


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 9.  RE: domxml_open_mem() function undefined.

    Posted Thu January 06, 2005 10:42 AM

    Thanks Ferry,
    Ill try it now and hope it works.
    You think this doesnt need commenting>?
    LoadModule php4_module c:/php/sapi/php4apache2.dll
    Cos when I start apache,it gives errors after editing the conf file.
    Thanks Ferry.

    YOU ARE RIGHT!BERGY is the best!Absolutely right:)

    Arsenal are the best!


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 10.  RE: domxml_open_mem() function undefined.

    Posted Thu January 06, 2005 10:56 AM

    U know what?If I follow this procedure,my apache always collapse.WHen I start it again,then its not working anymore…whats the problem?
    thanks

    Arsenal are the best!


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods


  • 11.  RE: domxml_open_mem() function undefined.

    Posted Thu January 06, 2005 11:38 AM

    You use Apache… Oh OK… On Windows… So now you probably have two webservers running on port 80. You don’t need to start Apache (you can use Internet Information Server (IIS)). If you want to use Apache, make sure IIS is not running on the same port as Apache. You can change that in the Apache config file or in the Control Panel/Administrative Tools/ Internet Information Services by right clicking the default website and cahging the TCP port to 8080 or something. If you’re not sure if either Apache or IIS is still running then you can check the Control Panel/Administrative Tools/Services (for Apache) or open a cmd shell by Start/Run/cmd and then type net stop w3svc to stop IIS and net start w3svc to start it again.

    Cheers mate!


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods


  • 12.  RE: domxml_open_mem() function undefined.

    Posted Thu January 06, 2005 12:03 PM

    I dont use IIS atall.I only use Apache!Im now installing IIS…hope its not too late bcos I reckon that should be done before installing Tamino server.
    Thanks for your quick replies :slight_smile:
    Kay

    Arsenal are the best!


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 13.  RE: domxml_open_mem() function undefined.

    Posted Thu January 06, 2005 12:31 PM

    Sorry to bother you mate…What about the PHP config?I need to configure it with IIS?Presently I have Apache and configureg PHP in the conf file of apache.I guess I should do the same with IIS?
    Sorry if Im saking stupid questions.
    Cheers

    Arsenal are the best!


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 14.  RE: domxml_open_mem() function undefined.

    Posted Sat January 08, 2005 12:27 AM

    Hi to everyone that replied me!But please its just not working.I followed all the instructions but still I get this error Fatal error: Call to undefined function: domxml_open_mem() in C:\Program Files\Apache Group\Apache2\htdocs\TaminoAPI.php .I have WIN XP,apache 2.I was able to query thru TIInterface though.But each time I try the example01.php it gives this error.I unzipped the taminoapi.php to this location C:\Program Files\Apache Group\Apache2\htdocs</B>.
    Please give me a detailed answer so that I can progress in what Im doing.
    Thank you
    Kay

    Arsenal are the best!


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management