Re: Re: Tidy 1.0 problems
| From: | John Coggeshall | Date: | Mon, 08 Mar 2004 09:02:22 +0000 |
| Subject: | Re: Re: Tidy 1.0 problems | ||
| References: | 1 2 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-457@lists.php.net to get a copy of this message | ||
I can't seem to reproduce this bug. Can you provide a backtrace of it in
Linux?
gdb /usr/local/apache/bin/httpd
(then, inside of gdb)
gdb> run -X
(make your request in the browser, gdb should show the segfault
(then, get the backtrace by executing...)
gdb> bt
(it shoudl list all the functions called...)
Please paste the BT here.
John
On Mon, 2004-03-08 at 02:29, Kaspars Foigts wrote:
> So far I have found the real (hopefully) reason why my precious (apache)
> goes away with segfault.
> There are four files:
>
> Configuration file for Tidy: http://laacz.lv/tmp/tidy/test.cnf.
> I guess hard
> line is "clean: 1", because, when this line is removed, everything works
> well (but html is not cleaned up).
> Input file, which is being cleaned upp well:
> http://laacz.lv/tmp/tidy/test.txt (encoding is utf-8)
> Input file, which causes segfault:
> http://laacz.lv/tmp/tidy/test-fault.txt
> (encoding is utf-8)
> And PHP source file: http://laacz.lv/tmp/tidy/code.phps
>
> Hope this helps in solving the problem...
>
> "Kaspars Foigts" <laacz@laacz.lv> wrote in message
> news:20040308055902.21499.qmail@pb1.pair.com...
> > Hello!
> >
> > I recently started using Tidy both on Linux (RedHat) and win32
> systems.
> > On
> > Linux I installed it as part of PHP (by rebuilding configure with
> > buildconf), for
> > Windows system I fetched latest php_tidy.dll from
> > http://snaps.php.net/win32/PECL_STABLE/
> >
> > Well, I got one issue I could not find solution for. Apache does
> > segfault when
> > I am trying to do tidy_clean_repair() more than once.
> >
> > Here goes sample PHP code:
> >
> > <?php
> > tidy_set_encoding('utf8');
> > // I guess it will react the same without these setopts's
> > tidy_setopt('show-body-only', 1);
> > tidy_setopt('output-xhtml', 1);
> > tidy_setopt('word-2000', 1);
> > tidy_setopt('clean', 1);
> > tidy_setopt('drop-empty-paras', 1);
> >
> > tidy_parse_string($lead);
> > tidy_clean_repair();
> > tidy_get_output();
> >
> > tidy_parse_string($content);
> > tidy_clean_repair();
> > $content = tidy_get_output();
> > ?>
> >
> > Because this takes place on different operational systems I guess
> > configuration
> > of them is not necessary.
> >
> > --
> > Kaspars Foigts
> > http://laacz.lv/
--
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-
John Coggeshall http://www.coggeshall.org/
The PHP Developer's Handbook http://www.php-handbook.com/
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-