Re: PHP 4.0 Bug #8425 Updated: PHP crashes if I include a page that uses xml parser.
| From: | Alex Black | Date: | Mon, 08 Jan 2001 19:13:52 +0000 |
| Subject: | Re: PHP 4.0 Bug #8425 Updated: PHP crashes if I include a page that uses xml parser. | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-43439@lists.php.net to get a copy of this message | ||
hi James,
I have two users reporting this bug in binarycloud, as much as I can beg and
plead for you ro wrap it in to 4.0.4pl1, I am.
anyone trying to user binarycloud with a version of php that has this
problem (which is 4.0.3pl1 +) will encounter this problem, and it will
prevent them from using the system.
-alex
--
Alex Black, Head Monkey
enigma@turingstudio.com
The Turing Studio, Inc.
http://www.turingstudio.com
vox+510.666.0074
fax+510.666.0093
Saul Zaentz Film Center
2600 Tenth St Suite 433
Berkeley, CA 94710-2522
> From: jmoore@php.net ("James Moore")
> Newsgroups: php.dev
> Date: 3 Jan 2001 04:59:33 -0800
> Subject: RE: [PHP-DEV] PHP 4.0 Bug #8425 Updated: PHP crashes if I include a
> page that uses xml parser.
>
> Jani,
>
> I think unless this is already in 404 tree then it will be in 4.0.5, the
> only patches to be in 4.0.4pl1 should be Zeevs to mod_php4.c to fix the two
> issues mentioned before.
>
> James
>
>> -----Original Message-----
>> From: sniper@php.net [mailto:sniper@php.net]
>> Sent: 03 January 2001 12:41
>> To: php-dev@lists.php.net
>> Subject: [PHP-DEV] PHP 4.0 Bug #8425 Updated: PHP crashes if I include a
>> page that uses xml parser.
>>
>>
>> ID: 8425
>> Updated by: sniper
>> Reported By: kirys@kt2k.com
>> Old-Status: Open
>> Status: Closed
>> Bug Type: Reproduceable crash
>> Assigned To:
>> Comments:
>>
>> This is fixed in CVS. Wait for PHP 4.0.4pl1 to be released.
>>
>> --Jani
>>
>> Previous Comments:
>> ------------------------------------------------------------------
>> ---------
>>
>> [2000-12-26 12:09:27] kirys@kt2k.com
>> The same script doesn't crash if used under v4.0.3
>> no additional modules used
>> The page MUST be included in a php file
>>
>>
>> Script Source code:
>> <?php
>> echo ".";
>> $file = "xml/links.xml";
>> $depth = array();
>> function startElement($parser, $name, $attrs) {
>> global $depth;
>> // for ($i = 0; $i < $depth[$parser]; $i++) {}
>> switch ($name){
>> case "LINKPAGE";
>> print"<TABLE WIDTH="98%" CELLSPACING=2 CELLPADDING=1
>> BORDER=0>n";
>> print"<TR BGCOLOR="Blue"><TD
>> CLASS="ListTitle2">Title</TD><TD
>> CLASS="ListTitle2">Vote</TD><TD
>> CLASS="ListTitle2">Comments</TD></TR>n";
>> break;
>> case "LINK":
>> print "<TR><TD CLASS="ListTitle2"><A CLASS="Menu"
>>
>> HREF="".$attrs["URL"]."">".$attrs["TITLE"]."</A></TD>";
>> print "<TD BGCOLOR="Silver"
>> ALIGN="CENTER">".$attrs["VOTE"]."</TD><TD
>> BGCOLOR="Silver">";
>> break;
>> case "SECTION":
>> print "<TR><TD CLASS="ListTitle" COLSPAN=3><CENTER>";
>> break;
>> default:
>> print "<TD>";
>>
>> }
>>
>> $depth[$parser]++;
>> }
>>
>> function endElement($parser, $name) {
>> global $depth;
>> switch ($name){
>> case "LINKPAGE";
>> print"<TR><TD Class="ListNote" COLSPAN=3>";
>> print"<B>Notes</B><BR>";
>> print"?/10: Means that I didn't decided a vote for
>> that site yet";
>> print"</TD></TR>";
>> print"</TABLE>n";
>> break;
>> case "SECTION":
>> print "</CENTER></TD></TR>";
>> break;
>> case "LINK":
>> echo"</TD></TR>";
>> break;
>> default:
>> echo"</TD></TR>n";
>>
>> }
>> $depth[$parser]--;
>> }
>>
>> function characterData($parser, $data) {
>> print "$data";
>> }
>>
>> echo ".";
>> $xml_parser = xml_parser_create();
>> echo ".";
>> xml_set_element_handler($xml_parser, "startElement",
>> "endElement");
>> echo ".";
>> xml_set_character_data_handler($xml_parser, "characterData");
>> if (!($fp = fopen($file, "r"))) {
>> die("could not open XML input");
>> }
>>
>> while ($data = fread($fp, 4096)) {
>> if (!xml_parse($xml_parser, $data, feof($fp))) {
>> die(sprintf("XML error: %s at line %d",
>>
>> xml_error_string(xml_get_error_code($xml_parser)),
>> xml_get_current_line_number($xml_parser)));
>> }
>> }
>> xml_parser_free($xml_parser);
>>
>>
>> ?>
>>
>>
>> ------------------------------------------------------------------
>> ---------
>>
>>
>> Full Bug description available at:
>> http://bugs.php.net/?id=8425
>>
>>
>> --
>> PHP Development Mailing List <http://www.php.net/>
>> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
>> For additional commands, e-mail: php-dev-help@lists.php.net
>> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>