问题
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:
Yes, you need to recompile PHP. Rerun ./configure
with the appropriate parameter (probably --enable-dom
, but I'm not sure on the param)
回答2:
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
回答3:
Use this command to install the dom extension.
yum install php-dom
and wait for the success message. After which reboot your Amazon instance, which would solve the problem.
来源:https://stackoverflow.com/questions/2785473/how-to-enable-core-php-extension-in-linux