简体   繁体   English

在Apache上安装PHP DOM函数

[英]Installing PHP DOM functions on Apache

I have just moved my code over to a new server (running on Apache 2.2.3), and PHP's DOM functions are now returning "Fatal error: Class 'DOMDocument' not found". 我刚刚将代码移到了新服务器(在Apache 2.2.3上运行)上,PHP的DOM函数现在返回“致命错误:找不到类'DOMDocument'”。

I did some research and it appears that the installation I am now on does not have PHP's DOM functions enabled. 我做了一些研究,看来我现在所在的安装没有启用PHP的DOM功能。

I need to enable these functions, so what is the quickest way to go about this? 我需要启用这些功能,所以最快的方法是什么? Is it doable from a configuration file or will it require installation of extensions? 它可以从配置文件执行还是需要安装扩展名?

Thanks! 谢谢!

Is PHP compiled with --disable-dom (check your phpinfo() )? PHP是否使用--disable-dom编译(请检查phpinfo() )? If PHP is compiled without DOM support you'll have to recompile PHP or find a precompiled binary which suits your needs. 如果PHP在没有DOM支持的情况下进行编译,则必须重新编译PHP或找到适合您需求的预编译二进制文件。 The manual clearly states that there are no installation needed in PHP5 and no configuration options . 该手册明确指出,PHP5中不需要安装 ,也没有配置选项

If you are for some reason running PHP 4, you should really upgrade to PHP 5. I you only want to enable the DOM XML extension in PHP4, read this manual page 如果出于某种原因要运行PHP 4,则应该真正升级到PHP5。我只想在PHP4中启用DOM XML扩展,请阅读此手册页

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM