To install libtidy in PHP5, it’s really quite easy.
Make sure your /tmp directory doesn’t have something like noexec set on it, otherwise this would be more difficult.
Here’s the install command:
pecl install http://pecl.php.net/get/tidy-1.2.tgz
Find where your main php.ini file is:
root@server [~]# php -i|grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
Add the module to your php.ini:
$EDITOR /usr/local/lib/php.ini
You’ll need to scroll down to the extensions area, I just keep searching for extension till I find it.
Add this line:
extension=tidy.so
Save, and restart your Apache web service:
service httpd restart
Test via phpinfo(); to make sure it’s working.
{ 3 comments… read them below or add one }
Good site I stumbled it today.. looking forward to seeing what else you have..later
Didn’t work for me. I am trying to install on a Virtual Private Server at Westhost.com. I get the error:
configure: error: Cannot find libtidy
Any suggestions?
I’m not sure what you’ve done — you shouldn’t be running ./configure anywhere. Did you follow my steps above?