Menno Schaaf wrote:
http://au.php.net/tidy
See example two: Basic Tidy Usage....
That's using the OO interface which I understand only works with php5
and tidy 2.0. It gives me a "Fatal error: Cannot instantiate
non-existent class: tidy" message. I'm using php 4.3.10 and tidy 1.1.
I have tried just about every bit of non-OO sample code I can find, with
a segfault every time, so I presume the problem is something to do with
my system rather than the PHP code. Even if my code is screwy, it
should die with an error message, not segfault.
I can't think of what the problem is, though. I've tried using the
original stand-alone tidy program with no problems. I've tried
installing slighty older versions of the tidy libs, and it makes no
difference.
Matthew.
On 5/25/05, Matthew Davidson <[EMAIL PROTECTED]> wrote:
Hi,
I want to manipulate some HTML code with PHP, and it appears the tidy
extension is the way to do it. I have installed everything by the book:
# apt-get install libtidy0 libtidy-dev
# pear -v install tidy
and added 'extension=tidy.so' to php.ini.
phpinfo() reports that the extension is loaded.
Unfortunately, this:
<?php
$tidy =
tidy_parse_string('<html><head><title>Test</title><body><h1>test</h1></body></html>');
?>
causes PHP to segfault, when run from both apache and the command line.
Any other test string I've tried does the same thing, as does
tidy_parse_file().
Some other functions, such as tidy_get_config() don't cause a segfault
(and actually work as advertised), unfortunately these are the functions
that don't actually do anything useful.
I am running Debian Sarge, php4, and apache 1.3.
What am I doing wrong?
Matthew.
--
Alma Technology
http://www.almatech.net.au
(02) 6658 1607 ... 0419 242 316
--
"...running an application in a browser is no longer like writing
with a brick tied to [your] pencil." - Mitch Kapor
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html