solution

#pecl install tidy
#apt-get install php5-tidy

you might have to add extension=tidy.so into php.ini

php tidy extension loaded but not working