Question

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.

Was it helpful?

Solution

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:

  1. Find a RHEL spare computer and install the complete development environment to compile PHP
  2. Install the PHP source code (SRPM package)
  3. Edit the php.spec file so it contains instructions to create a php-tidy.rpm package
  4. Build the php-tidy.rpm package with rpmbuild -ba php.spec or a similar command

You 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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top