|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-11-15 16:09 UTC] iliaa@php.net
[2002-11-15 23:53 UTC] blizz at 0x03 dot net
[2002-11-18 07:30 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 07:00:02 2025 UTC |
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 ?