php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19087 Invalid page fault in module PHP4TS.DLL
Submitted: 2002-08-24 15:41 UTC Modified: 2002-08-27 01:33 UTC
From: tony at marston-home dot demon dot co dot uk Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4.2.2 OS: Windows ME
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tony at marston-home dot demon dot co dot uk
New email:
PHP Version: OS:

 

 [2002-08-24 15:41 UTC] tony at marston-home dot demon dot co dot uk
I am running PHP 4.2.2 with Apache 1.3.26 under Windows ME.

When I run a particular PHP script Apache reports an error in PHP4TS.DLL.
Below is the contents of FAULTLOG.TXT:

Date 08/24/2002 Time 16:38
APACHE caused an invalid page fault in module PHP4TS.DLL at 018f:1009c557.
Registers:
EAX=051ad130 CS=018f EIP=1009c557 EFLGS=00010206
EBX=007e9f40 SS=0197 ESP=016ff998 EBP=016ffac4
ECX=00000000 DS=0197 ESI=016ff9a8 FS=454f
EDX=016ff9f4 ES=0197 EDI=007e9f40 GS=0000
Bytes at CS:EIP:
66 ff 48 0a 8b 06 66 8b 48 0a 66 85 c9 75 30 50
Stack dump:
00818e30 012c1b0a 016ff9a8 012c1b59 051ad130 00818ed0 012c1b32 00818e30
00818f70 012c1b32 00818ed0 0080f010 012c1b32 00818f70 00817080 012c1ac4

The particular script I am running is as follows:

<?php
header("Content-type: text/xml\n");

// connect
$connection = mysql_connect("localhost", "tony", "tony")
 or die("Could not connect to MySQL");

$db = mysql_select_db('bondmovies', $connection)
 or die("Unable to open database 'bondmovies'");

// construct the query
$sql = "SELECT movie.title,movie.year,actor.name
        FROM movie,actor
        WHERE movie.actor_id=actor.id
        ORDER BY movie.year ASC";

$result = mysql_query($sql, $connection)
 or die("Error in query: $sql." .mysql_error());

// create xml object
$doc = domxml_new_xmldoc("1.0");

// add root node
$root = $doc->create_element("bondmovies");
$root = $doc->append_child($root);

// iterate through resultset
while($row = mysql_fetch_object($result)){
 $movie = $doc->create_element("movie");
 $movie = $root->append_child($movie);
 foreach ($row as $fieldname => $fieldvalue) {
  $child = $doc->create_element($fieldname);
  $child = $movie->append_child($child);
  $value = $doc->create_text_node($fieldvalue);
  $value = $child->append_child($value);
 }
} // endwhile

mysql_close($connection);
echo $doc->dump_mem(true);
?>

When I run this inside PHPEdit in debug mode it fails AFTER producing all
the expected output.

I have another version of this script which uses an earlier set of DOMXL
functions (which are supposed to be deprecated) which works OK without any
error.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-24 15:52 UTC] sander@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip
 [2002-08-24 17:01 UTC] tony at marston-home dot demon dot co dot uk
I have just tried that php4_win32_latest.zip but I now cannot get Apache to run. It displays the error "cannot load php4apache.dll into server". I checked this with Dependency Walker and it tells me that down the chain of dll references is a call to APPHELP.DLL that cannot be satisfied as the file cannot be found.

I have been getting the same error ever since I tried loading the php_xslt.dll. This is apparently a Microsoft dll that is only distributed on Win2K or WinXP systems, but file SHLWAPI.DLL (last updated by IE6) somehow contains a reference to it.

Without this file I cannot run this version of PHP.

Without this file I cannot run the xslt extension of the previous version.
 [2002-08-27 01:33 UTC] chregu@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


Please try using this CVS stable snapshot:

  http://snaps.php.net/php4-STABLE.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE.zip

This will be very soon PHP 4.2.3 and should help with your problem with PHP/domxml/Windows... 

chregu
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 15:01:31 2024 UTC