tags:

views:

83

answers:

1

I have HTML tidy extension on my home computer using PHP 5.2.11 (Windows - WAMP), and I use this to clean up HTML:

$data = tidy_parse_string($data, array(
   'clean'  => TRUE,
   'indent'  => 0,
   'output-xhtml' => true,
   'wrap'  => 7000,
   ));

This works great on my home machine, but on the actual server on which the website runs (LAMP), I get the error:

tidy_parse_string expects exactly 1 parameter, 2 given in....

The phpinfo() on my local machine gives a version number:

2.0 ($Id: tidy.c 272374 2008-12-31 11:17:49Z sebastian $) 

But the phpinfo() on the server does not give a version. If I can't get a *nix version that accepts configuration (why on earth can't it?), then how do I pass these config vars to tidy?

+1  A: 

Sounds like you're running an old version of the Tidy PECL extension. Try updating it:

pecl update-channels
pecl upgrade

That should correct it, hope it helps!

mattbasta