Page 1 of 1

problem with domxml_open_file() in php in apache.

Posted: Tue Jan 02, 2007 2:12 am
by nadavvin
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I have weird problem with php.

Code: Select all

<?php

// Load the XML source
$xml = domxml_open_file('tmp.xml');

$xsl = domxml_xslt_stylesheet_file('xsl/options.xsl');

$result= $xsl->process($xml);

echo $xsl->result_dump_mem($result);

?>
It's work well when I run from the bash: php test.php

But I get error message if it run from apache:

Code: Select all

PHP Fatal error:  Call to undefined function:  domxml_open_file()
What is the problem?

Centos 4.


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Tue Jan 02, 2007 4:05 am
by nadavvin
I have the file:

Code: Select all

/usr/lib/libxml2.so.2.6.16

How do I configure Apache to use it?

I add this line to the module section:

Code: Select all

LoadModule  xml_module  /usr/lib/libxml2.so.2.6.16
and I get:

Code: Select all

Can't locate API module structure `xml_module' in file /usr/lib/libxml2.so.2.6.16: /usr/lib/libxml2.so.2.6.16: undefined symbol: xml_module

How do I know what is the symbol?

Posted: Tue Jan 02, 2007 4:58 am
by nadavvin
problem solve.

I should be LoadFile.