PHP 和 HTML Tidy - 无需编译?
我的 RHEL 服务器上已经安装了 PHP5。它通过 yum 进行管理,因此安全更新会照常应用。
我需要 HTML Tidy 功能,并且沮丧地发现(似乎)没有可用的 php5 扩展,并且(似乎)获得它的唯一方法是编译 php --with -tidy。为了获得整洁的功能而改变我的 yum 管理的 php 安装和编译似乎有点过分了。
还有其他我没有找到的将 HTML Tidy 与 php5 集成的方法吗?
编辑答案:
感谢 cyberx86 (来自 serverfault)提供启用 EPEL 并在那里获取 php-tidy 包的建议。
步骤:
[shell]# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm [shell]# yum install php53-tidy.x86_64
完成,谢谢。
I have an existing installation of PHP5 on my RHEL server. It's managed via yum, so security updates are applied as usual.
I have need for HTML Tidy functionality, and was dismayed to learn that there (seemingly) is not a php5 extension available, and that (seemingly) the only way to get it is to compile php --with -tidy. Zapping my yum-managed php installation and compiling just to get tidy functionality seems excessive.
Are there other methods for getting HTML Tidy integrated with php5 that I'm not finding?
Edited with answer:
Thanks to cyberx86 (from serverfault) for the suggestion of enabling EPEL and grabbing the php-tidy package there.
Steps:
[shell]# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
[shell]# yum install php53-tidy.x86_64
Done and thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不需要编译完整的 PHP 包集并丢弃所有现有的二进制文件。您可以简单地编译 tidy 扩展并创建一个二进制 RPM 包。当我说简单时,我的意思实际上是它并不简单。大致步骤是:
您现在可以使用 rpm -ivh 来安装全新的软件包。当红帽发布安全升级时重复此操作。
确切的细节(可能还有完整的问题)超出了本网站的范围。
You don't need to compile the complete PHP package set and discard all your existing binaries. You can simply compile the tidy extension and create a binary RPM package. When I say simply I actually mean it isn't simple. The rough steps are:
rpmbuild -ba php.spec
or a similar commandYou can now install your brand new package with
rpm -ivh
. Repeat when Red Hat releases a security upgrade.The exact details (and possibly the complete question) fall beyond the scope of this site.