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?
+1
A:
Yes, you need to recompile PHP. Rerun ./configure
with the appropriate parameter (probably --enable-dom
, but I'm not sure on the param)
webdestroya
2010-05-07 00:44:25
K I'll try it--
Yarin
2010-05-07 02:39:03
Did you install the php version having `--disable-dom` from sources as well or is it a package from your distribution's repository? If it's a package first look for a php_dom package which will (most likely) provide the dom extension as a shared module. If you really, really have to compile php from source I strongly recommend that you use your distribution's build-system for that. Otherwise you have a (managed) package + custom built version in your system and your version might be overwritten by an update in the repository.
VolkerK
2010-05-07 02:44:51
VolkerK, maybe you can help me out with this- I'm on a server I didn't set up, it's an Amazon Ec2 instance, preconfigured w PHP, Apache. I'm trying to determine if my php is an apache module or cgi installation- I see both a LoadModule php5_module modules/libphp5.so directive in my httpd...php.conf file, but also have directories for /usr/bin/php-cgi. Does that make sense, thought it would be one or the other?
Yarin
2010-05-07 04:14:24
If it's an Apache module, do I still do the recompile thing?
Yarin
2010-05-07 04:47:04
+1
A:
You might be able to install it from your distributions repository. If not download your php versions source, extract it from the tarball. cd to the directory php/ext and look for a dom folder, cd into that and type phpize then make && make install that will install a dynamic extension for you which you can enable via extension=.so in your php.ini
Obsidian
2010-05-07 02:26:43