Tidy

Any wishes or suggestions for MAMP?
Post here what functions you are still missing for MAMP.

Moderator: severin

Post Reply
saturn5
Posts: 1
Joined: Mon 1. Sep 2008, 01:22

Tidy

Post by saturn5 » Mon 1. Sep 2008, 01:28

Please add tidy to MAMP. It would be very useful to many developers.

While I've been able to use PECL to install new PHP extensions, for some reason I've been unsuccessful with installing tidy. Since tidy would be of general use to many developers, perhaps it would make more practical sense for the MAMP maintainers to include it.

Eelco
Posts: 1
Joined: Fri 16. Jan 2009, 11:24

Re: Tidy

Post by Eelco » Fri 16. Jan 2009, 11:59

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/ph ... cro-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.

Adrian B
Posts: 3
Joined: Sat 12. Sep 2009, 08:59

Re: Tidy

Post by Adrian B » Sun 3. Jan 2010, 04:00

I second the request for Tidy in MAMP.

The way Eelco found seems complicated, just having it installed by default would be much better.

Adrian B
Posts: 3
Joined: Sat 12. Sep 2009, 08:59

Re: Tidy

Post by Adrian B » Mon 4. Jan 2010, 13:51

I tried the solution Eelco posted with PHP 5.2.12, but with no luck.

First I ran into the iconv bug and had to edit the iconv.c file according to a patch from Apple. Then I ran into a tidy bug so I had to download PHP 5.3.1 and copy the tidy folder to my PHP 5.2.12 folder. Then I finally go my tido.so file that I copied to the no-debug-non-zts-20060613 in MAMP. But still no support for Tidy in MAMP... :(

So, I still wish MAMP would include support of Tidy by default.

jounderw
Posts: 2
Joined: Thu 11. Nov 2010, 16:13

Re: Tidy

Post by jounderw » Thu 18. Nov 2010, 17:27

I agree that there needs to be a request for Tidy on MAMP. I just recently Needed to install Tidy with MAMP. Some googling found a few solutions, none seemed to work. One caveat is that I am running on Snow Leopard and needed to back out PHP 5.3 to 5.2.
Business Process Automation

chalkin
Posts: 2
Joined: Tue 16. Feb 2010, 23:37

Re: Tidy

Post by chalkin » Wed 19. Jan 2011, 23:24

This howto was working for me with MAMP 1.9 PRO

http://allensservices.com/php-tidy-on-mamp

I Installed Zend Studio 8.0 and opened the program package in my Application folder to get the tidy.so
(did it for PHP 5.3.2)

it was located in /Applications/Zend Studio/contents/Resources/java/plugins/org.zend.php.debug.debugger.macosx_5.3.18.v20100905/resources/php53/ext/tidy.so

copied it to Mamp php 5.3 extension folder like the howto tells to do and added it in my php.ini for php 5.3 and restarted apache. There it was!

fitzybhoy
Posts: 2
Joined: Fri 5. Aug 2011, 13:01

Re: Tidy

Post by fitzybhoy » Fri 5. Aug 2011, 13:04

maybe i'm doing something wrong but now it dpesn't work((

darelp
Posts: 1
Joined: Sun 22. Jan 2012, 17:47

Re: Tidy

Post by darelp » Sun 22. Jan 2012, 17:51

chalkin wrote:This howto was working for me with MAMP 1.9 PRO

http://allensservices.com/php-tidy-on-mamp

I Installed Zend Studio 8.0 and opened the program package in my Application folder to get the tidy.so
(did it for PHP 5.3.2)

it was located in /Applications/Zend Studio/contents/Resources/java/plugins/org.zend.php.debug.debugger.macosx_5.3.18.v20100905/resources/php53/ext/tidy.so

copied it to Mamp php 5.3 extension folder like the howto tells to do and added it in my php.ini for php 5.3 and restarted apache. There it was!
This is exactly what I was looking for! I don't know what the poster above did wrong, but it worked perfectly for me. Thanks!

butuzov
Posts: 2
Joined: Thu 1. Mar 2012, 14:59

Re: Tidy

Post by butuzov » Thu 1. Mar 2012, 15:01

any way to have tidy in MAMP's php pack setuped by default?

juliovedovatto
Posts: 1
Joined: Tue 17. Apr 2012, 21:34

Re: Tidy

Post by juliovedovatto » Tue 17. Apr 2012, 21:53

Just for the record here.

1) Download tidy from pecl - http://pecl.php.net/package/tidy
2) Untar and go to folder via Terminal (command line)
3) Put "/Applications/MAMP/bin/php/php5.3.6/bin" in $PATH enviroment

Code: Select all

# PATH=PATH:/Applications/MAMP/bin/php/php5.3.6/bin
# echo $PATH
(echo $PATH just to be sure that "/Applications/MAMP/bin/php/php5.3.6/bin" is in $PATH)
4) Run following commands:

Code: Select all

# phpize
# MACOSX_DEPLOYMENT_TARGET=10.6 \
CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" \
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" \
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" \
LDFLAGS="-arch i386 -arch x86_64 -bind_at_load" \
./configure
# make && make install
If make install trows error: "cp .... Permission denied", try create the directory

Code: Select all

# sudo mkdir -p /opt/local/lib/php/extensions/no-debug-non-zts-20090626/
# sudo make install
Now, we need to move tidy.so from /opt/local/lib/php/extensions/no-debug-non-zts-20090626/ to correct extension's folder:

Code: Select all

# sudo cp /opt/local/lib/php/extensions/no-debug-non-zts-20090626/tidy.so /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/
Then activate in php.ini in MAP (File > Edit Temple > PHP > PHP 5.3.6 PHP.ini and put "extension=tidy.so" to load

Restart MAMP and check if worked.

(Based on MAMP 1.9.0)

blitzer109
Posts: 1
Joined: Sun 20. May 2012, 21:29

Re: Tidy

Post by blitzer109 » Mon 21. May 2012, 12:21

Can I add my vote to include tidy.

I have tried all the methods listed on the forum and I cannot get tidy to work.

Zelma
Posts: 1
Joined: Wed 13. Jun 2012, 12:34

Re: Tidy

Post by Zelma » Thu 14. Jun 2012, 12:13

Agree! I'm also for adding tidy to MAMP)
It seems to be very convenient and helpful for all of us;)

bdimaggio
Posts: 1
Joined: Wed 3. Apr 2013, 12:58

Re: Tidy

Post by bdimaggio » Wed 3. Apr 2013, 13:02

Hey all -- Have been trying to get Tidy working on OS 10.7, MAMP PRO 2.0.5, for some time without success. Your instructions looked promising, juliovedovatto, but after carefully following them a couple of times, I've had no luck. Does anybody else have suggestions?
Thanks,
Ben

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest