ID: 20442 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Analyzed Bug Type: XML related Operating System: NetBSD 1.6 PHP Version: 4CVS-2002-11-15 New Comment:
This bug is actually the result of a bug in the bundled expat library. You can fix the problem by installing the latest expat from http://sourceforge.net/project/showfiles.php?group_id=10127&release_id=109357 I am leaving the bug open, until the bunbled expat library is upgraded to the latest stable release. Previous Comments: ------------------------------------------------------------------------ [2002-11-15 03:54:06] [EMAIL PROTECTED] It looks like the xml_get_current_line_number of xml produces a segmentation fault. Here is the piece of code : function parse($file) { if(!($fp = fopen($file, 'r'))) echo "xml_parser error: Could not open $file.\n"; else while($data = fgets($fp, 4096)) if(!xml_parse($this->parser, $data, feof($fp))) echo 'xml_parser error: ', xml_error_string(xml_get_error_code($this->parser)), ' at line ', xml_get_current_line_number($this->parser), "\n"; fclose($fp); return $this->struct; } If the data.xml looks like this for example : <Example> <Test>Bla</Test> <Test>Muh</test> </Example> I runned the xml example file in shell and here is the output : Example Test Test xml_parser error: mismatched tag at line 4 xml_parser error: mismatched tag at line Segmentation fault (core dumped) Now where is the problem ? Does the XML parser try to get the line and is already at the end of the file ? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20442&edit=1