I'm trying to understand the process for enabling an a core extension (dom) in php. When I run phpinfo, I see '--disable-dom' in the configure command. Am I supposed to re-install PHP?

link|improve this question

67% accept rate
How are you installing PHP? Through a package manager? From source? – heavyd May 7 '10 at 0:45
That's a good question- I'm working off of an Amazon EC2 Fedora server instance that already had Apache-PHP installed. How would I be able to tell how it was installed? – Yarin May 7 '10 at 2:36
OK let me revise this- It's PHP as an Apache module- does that make a difference? – Yarin May 7 '10 at 4:45
feedback

4 Answers

up vote 0 down vote accepted

What linux version are you using? If you are using Centos, you can install dom with command:

yum install php5-dom
link|improve this answer
Thanks Neto- tried that, seemed like a good option- but getting "No package php5-dom available" – Yarin May 7 '10 at 2:38
Ok, this worked: "yum install php-dom" Thanks Neto, for the easiest path! – Yarin May 7 '10 at 5:19
feedback

The configure command only shows which options have been built directly into the PHP executable. It is still possible to provide extensions as... extensions, installable/buildable separately.

link|improve this answer
Ignacio- so how would I go about providing extensions separately? – Yarin May 7 '10 at 2:37
feedback

Try restarting apache. I think for Fedora it's service httpd restart

link|improve this answer
feedback

centos/redhat is

yum install php-xml

As you can see here

# rpm -qf /etc/php.d/dom.ini
php-xml-5.2.9-2
link|improve this answer
Yeah, I did this "yum install php-dom" and I think it installed the php-xml as well- maybe points to the same thing? – Yarin May 8 '10 at 13:48
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.