Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to setup the W3C fork of HTMLTidy (tidy-html5) as a PHP extension.

I had installed the normal php/tidy extension using the php5-tidy package.

I then downloaded the Git repository, and ran the following commands to compile the shared library:

sh build/gnuauto/setup.sh && ./configure && make
sudo make install

After restarting the php5-fpm service, I still see the same tidy information on phpinfo():

libTidy Release    25 March 2009
Extension Version  2.0 ($Id$)

Shouldn't the PHP extension start using tidy-html5 at this point? What can I do to make it work?

share|improve this question

2 Answers 2

As I understand tidy-html5 is not a php module, so you can't use it directly with apache. It's just a command line tools and/or shared library. You could try to built php with new shared library

# configure ...
--with-tidy=shared,/usr/local/tidy-html5
share|improve this answer
    
That's right, it's a shared library. Regarding the PHP configure command, how can I preserve existing configure options? I'm asking this because I installed PHP and all the other extensions using either apt or pecl and I'm not sure what kind of magic goes into play there. –  Alix Axel Jul 3 '13 at 1:31

Unfortunately, I'm not ubuntu/debian expert (As I see you have used apt). On RHEL based system I just download and install http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/SRPMS/php53u-5.3.26-2.ius.el6.src.rpm, edit /root/rpmbuidl/SPESC/php53u.spec and rebuild rpm package

# rpmbuild -ba --target=x86_64 php53u.spec

As far as I know, on debian you can rebuild package too. Something like

$ sudo apt-get install devscripts build-essential fakeroot
$ apt-get source libapache2-mod-php5 php5-tidy
$ sudo apt-get build-dep libapache2-mod-php5
$ debuild -us -uc
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.