I have find a way to use Tidy with the PHP of MAMP
- Download php 5.2.6 from the PHP website
*
http://nl.php.net/get/php-5.2.6.tar.bz2/from/a/mirror- Unpack it somewhere
- There is a bug in Tidy.c so we have to change something first. (Nobody said this was a regular installation)
- In finder go to the ./ext/tidy folder and open tidy.c
- move line 34: #include "tidy.h" to line 24 of tidy.c
*More detailed explenation:
http://blog.yimingliu.com/2008/01/26/php-525-compile-error-macro-issue/- Launch the terminal and go to the folder of the php source file
- Configure the build: ./configure --with-tidy=shared
- Make the build: make
- In the folder ./modules there is the tidy module: tidy.so
- Copy this file to: /Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/
- Open php.ini add the following line: extension=tidy.so (for example at line: 547)
Restart Apache en check the phpinfo page.