domxml_open_mem() function undefined.

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

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.

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

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.

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!

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!

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!

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:

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!

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!

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!

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!

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!

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!