dufault.info

Ramblings of a phone weenie, Linux sysadmin, and other things geeky

26  07 2008

Installing libtidy in PHP5 on a CentOS cPanel server

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.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Mixx
  • StumbleUpon
  • Technorati

3 Comments

(Required)
(Required, will not be published)

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.

« Sysadmin day Typespeed »