problem with domxml_open_file() in php in apache.

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
nadavvin
Forum Commoner
Posts: 68
Joined: Wed Sep 06, 2006 6:05 am

problem with domxml_open_file() in php in apache.

Post 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]
nadavvin
Forum Commoner
Posts: 68
Joined: Wed Sep 06, 2006 6:05 am

Post 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?
nadavvin
Forum Commoner
Posts: 68
Joined: Wed Sep 06, 2006 6:05 am

Post by nadavvin »

problem solve.

I should be LoadFile.
Post Reply