Here is a HOWTO add tidy support via XAMPP extension on Snow Leopard (SL). Hope you will find usefull :
1. Install Apple Xcode from the SL install DVD.
(I don't know if it is needed, but i have installed XAMPP Dev package too.)
2. Download and extract PHP 5.3.0.
3. Go to 'tidy' directory
- Code: Select all
cd Downloads/php-5.3.0/ext/tidy/
4. Modify ext/tidy/tidy.c from the downloaded PHP (step 3) as documented in this link, http://sarth.thallos.org/2008/01/php-525-compile-error-macro-issue.html.
5. Compile tidy extension in 32bit, cause i think XAMPP is in 32 too :
- Code: Select all
/Applications/XAMPP/xamppfiles/bin/phpize-5.3.0
CFLAGS=-m32 CPPFLAGS=-m32 CCASFLAGS=-m32 ./configure --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config
CFLAGS=-m32 CPPFLAGS=-m32 CCASFLAGS=-m32 make
CFLAGS=-m32 CPPFLAGS=-m32 CCASFLAGS=-m32 sudo make install
(maybe CFLAGS=-m32 CPPFLAGS=-m32 CCASFLAGS=-m32 are not needed everyline, but i'm not a master in compilation)
php.ini should have "extension=tidy.so" added automatically and tidy.so putted directly to /Applications/XAMPP/xamppfiles/lib/php/php-5.3.0/extensions/no-debug-non-zts-20090626/
Finally, restart XAMPP and verify via phpinfo(); if the tidy extension loaded. Enjoy !