php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16794 random (?) Apache crash using domxml
Submitted: 2002-04-24 09:57 UTC Modified: 2002-07-04 03:05 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: manuzhai@php.net Assigned:
Status: No Feedback Package: DOM XML related
PHP Version: 4.2.0 OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: manuzhai@php.net
New email:
PHP Version: OS:

 

 [2002-04-24 09:57 UTC] manuzhai@php.net
I'm trying to use php_domxml with PHP on Apache 1.3.24 on Windows XP. I used php_domxml quite succesfully with PHP 4.1.2, but now that I've got 4.2.0 installed, Apache will sometimes crash on using domxml functions. Sometimes it works, sometimes it'll crash (seems to be kinda related to the size of the XML document).

Information: http://bug.xavamedia.nl/

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-25 07:26 UTC] manuzhai@php.net
Forgot to add I was using the Apache SAPI.
 [2002-04-25 10:45 UTC] jtate@php.net
Can you submit a minimal script for which this crash occurs?  Perhaps some sample XML?  Can you look through the Apache error logs for anything that will shed some more light on the issue?
 [2002-04-25 11:49 UTC] manuzhai@php.net
I think this is the relevant part of my Apache error log. My installation locations are a bit weird:

Apache: P:\Daemons\Apache
PHP: P:\Daemons\PHP
DocumentRoot: W:\

[Mon Mar 25 11:12:06 2002] [error] [client 24.132.205.20] File does not exist: p:/daemons/apache/htdocs/_vti_bin/..%5c/..%5c/..%5c/winnt/system32/cmd.exe
[Mon Mar 25 11:12:07 2002] [error] [client 24.132.205.20] File does not exist: p:/daemons/apache/htdocs/_mem_bin/..%5c/..%5c/..%5c/winnt/system32/cmd.exe
[Mon Mar 25 11:12:07 2002] [error] [client 24.132.205.20] File does not exist: p:/daemons/apache/htdocs/msadc/..%5c/..%5c/..%5c/..?/..?/..?/winnt/system32/cmd.exe
[Mon Mar 25 11:12:07 2002] [error] [client 24.132.205.20] File does not exist: p:/daemons/apache/htdocs/scripts/..?/winnt/system32/cmd.exe
[Mon Mar 25 11:12:07 2002] [error] [client 24.132.205.20] File does not exist: p:/daemons/apache/htdocs/scripts/..??/winnt/system32/cmd.exe
[Mon Mar 25 11:12:08 2002] [error] [client 24.132.205.20] File does not exist: p:/daemons/apache/htdocs/scripts/..??/winnt/system32/cmd.exe
[Mon Mar 25 11:12:09 2002] [error] [client 24.132.205.20] File does not exist: p:/daemons/apache/htdocs/scripts/..%5c/winnt/system32/cmd.exe
[Mon Mar 25 11:12:09 2002] [error] [client 24.132.205.20] File does not exist: p:/daemons/apache/htdocs/scripts/..%2f/winnt/system32/cmd.exe
 [2002-04-25 11:53 UTC] manuzhai@php.net
Some PHP scripts that made it crash are now in the aforementioned dir.
 [2002-04-25 11:59 UTC] jtate@php.net
Nope.  What you're seeing in those lines from the apache log are attempts by the code red worm to break into your system.  But you're safe since you're not running IIS.  If you'll post your apache error_log file to that site, I'll take a look at it.
 [2002-04-25 12:10 UTC] manuzhai@php.net
Done.
 [2002-04-25 12:10 UTC] manuzhai@php.net
I uninstalled php_domxml yesterday at about this time from PHP (commented it out from php.ini).
 [2002-04-25 13:26 UTC] jtate@php.net
You have issues with the XML that you're trying to process.  An excerpt from the error.log file:

-Entity: line 5: error: Premature end of data in tag <br>
-<br>
-<b>Warning</b>:  Bad
-
-^
-Entity: line 5: error: Premature end of data in tag <br>
-<b>Warning</b>:  file("ht
-
-^
-Entity: line 1: error: Start tag expected, '<' not found
-Last-Modified: Thu, 04 Apr 2002 18:13:49 GMT


Fix the xml errors and you might not get crashes.

I'll admit that php should not crash when fed invalid xml, but more important is to get it working with valid xml.

If you fix the xml errors and still get the same problem, feel free to reopen this bug.
 [2002-04-25 13:30 UTC] jtate@php.net
Another observation from the error log:

The errors that are given makes me believe that it's trying to apply XML parsing rules to a HTML document.  Looks like your got.php should be modified to make sure that you got a 200 return code rather than some html error message.
 [2002-04-26 04:17 UTC] manuzhai@php.net
Two interesting observations.

- The domxml from 4.2.0 WILL work correctly with 4.1.2, but not with 4.2.0.
- After Apache crashes, the output does show up correctly.

I uploaded a new file test.got.php, and it will start var_dumping correctly, but somewhere while working on getChildren(), it will crash Apache, and then it will start over, and crash again, infinitely (well, I let it run for a couple of minutes).

But the script works right until I call getChildren, I checked if the XML that got through was right, and it was.
 [2002-06-14 09:16 UTC] chregu@php.net
Could you please check the latest Stable-snapshots from
http://snaps.php.net (http://snaps.php.net/win32/php4-win32-STABLE-latest.zip)
and see, if the problem still is there.

chregu

 [2002-07-04 03:05 UTC] chregu@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Sep 20 14:01:28 2019 UTC