How to enable core PHP extension in Linux?

江枫思渺然 提交于 2019-12-24 10:52:36

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!