|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Enable DOM within PHP. Help me please!
I am running FC4 86x64. Apache 2.0 and PHP 5.0.4 works well. But when trying
<?php $dom = new DOMDocument(); $xml = '<?xml version="1.0" encoding="UTF-8"?> <node1> <node2 /> </node1> '; $dom->loadXML( $xml ); $nodeList = $dom->getElementsByTagName( 'node1' ); $node1 = $nodeList->item(0); foreach ( $node1->childNodes as $node ) { echo 'Class: ' . get_class( $node ) . "n"; } ?> I get an error PHP Fatal error: Class 'DOMDocument' not found in test1.php on line 2 Run phpinfo(), I see --disable-dom I don't know how to enable DOM within PHP Furthermore, when I try to run ./configure to fix the above problem as an advice from Google, it shows bash: ./configure: No such file or directory I am a beginner of Linux. Anybody can help me with these problems? Thanks a lot!!! chicken |
|
#3
|
|||
|
|||
|
RE: Enable DOM within PHP. Help me please!
I ran into this problem too and I was not satisfied with 'rebuild' answer. Turns out, Fedora 4 doesn't come with the php-xml rpm installed. you can find this rpm at http://rpm.pbone.net/index.php3/stat/4/idpl/2377446/com/php-xml-5.0.4-10.5.i386.rpm.html (my php rpm was version 5.0.4-10.5, so i used that php-xml version). I installed this using rpm -i php-xml... and the DOMDocument worked fine.
|
|
#4
|
|||
|
|||
|
RE: RE: Enable DOM within PHP. Help me please!
Quote:
Yep, that was exactly my problem, worked like a charm for me. Thx for the fix! |
|
#5
|
||||
|
||||
|
RE: RE: RE: Enable DOM within PHP. Help me please!
Quote:
|
|
#6
|
|||
|
|||
|
RE: Enable DOM within PHP. Help me please!
NOTE!
Do not forget to restart your webserver when using php pages in it. eg use /etc/init.d/httpd restart |
|
#7
|
|||
|
|||
|
I did the same for FC7. It's working fine. Great job.
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > Enable DOM within PHP. Help me please! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|