HOBALL 筆記簿

September 29, 2009

HTML Tidy on linux under XAMPP

Filed under: PHP — Tags: , , , — hoball @ 11:53 pm

Installing tidy on PHP5 under linux is pain. The manual says  “compile with –with-tidy”, but it is not really happening.

Finally I made it work on my fedora (using XAMPP) by this method:

# Install libtidy
yum -y install tidy

# Download PHP 5 source
http://www.php.net/downloads.php

# Unpack the source
tar xvzf php-5.3.0.tar.gz

# Configure tidy for installed php5 API
cd php-5.3.0/ext/tidy
/opt/lampp/bin/phpize

# Stay at the same folder, Configure & Compile the source
./configure --with-php-config=/opt/lampp/bin/php-config --with-tidy
make clean    <-- Without this the compile builds a bad module for some reason
make
make install

# Install module into php.ini - Add:: extension="tidy.so"
vi /opt/lampp/etc/php.ini

References:

ubuntuforums.org: LAMP: php5-tidy doesn’t exist!

newsn.net 给AndLinux下面的xampp装tidy模块的经验 (Chinese)

/opt/lampp/etc/php.i

3 Comments »


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: