php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6658 does not work on 4.02
Submitted: 2000-09-11 14:31 UTC Modified: 2001-02-15 08:49 UTC
From: hui at plasmedia dot com Assigned:
Status: Closed Package: XML related
PHP Version: 4.0.2 OS: linux slackware 7.0
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hui at plasmedia dot com
New email:
PHP Version: OS:

 

 [2000-09-11 14:31 UTC] hui at plasmedia dot com
I do not understand why the below script works on 4.01pl2 but does not work on 4.02, there are no php error message, but only the standart error "the page cannot be displayed"
I suspect i implement xml methods that does not being supported at 4.02
<?
class xml
{
  var $buffer;
  var $parser;
  var $returntidak;
  var $returnsatu;
  var $returnlebih;
  var $returnvar;
  var $hihi;
  var $votetidak;
  function xml()
  {
    $this->parser = xml_parser_create();
    xml_set_object($this->parser,&$this);
    $returntidak=xml_set_element_handler($this->parser,"tag_open","tag_close");
    //echo $returntidak;
    //xml_set_character_data_handler($this->parser,"cdata");
   
  }
  function parse($data){
     xml_parse($this->parser,$data);
    
  }
  
  function sethasil($hasil)
  {
  	$returntidak=$hasil;
  } 
  function gethasil()
  {
     echo $returntidak;
     return $returntidak;
  }  
  function parse($data) {
    xml_parse($this->parser,$data);
  }   
  function tag_open($parser,$tag,$attributes){
	$votetidak=0;
     while (list ($key, $val) = each ($attributes)) {

     	if (strcmp($tag,"TIDAKADA")==0)
     	   {
     	   	$votetidak=$val;
     	   	echo "<p>".$val . " orang memilih Indonesia tidak bakal mendapatkan emas";     	   
     	   }    
        if (strcmp($tag,"SATU")==0)
     	   {
     	   	$votesatu=$val;
     	   	echo "<p>".$val . " orang memilih Indonesia bakal mendapatkan 1 emas";     	   
     	   }     	   
     	if (strcmp($tag,"LEBIH")==0)
     	   {
     	   	$votelebih=$val;
     	   	echo "<p>".$val . " orang memilih Indonesia bakal mendapatkan lebih dari 1 emas";
     	   }

      }
      
  }
	
  function cdata($parser,$cdata){
     //var_dump($parser,$cdata);
  }
  function tag_close ($parser,$tag){
     //var_dump($parser,$tag);
  }
  	
}


function tag_open($parser,$tag,$attributes) {
var_dump($parser,$tag,$attributes);
}
function cdata($parser,$cdata) {
var_dump($parser,$cdata);
}

?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-15 08:49 UTC] thies@php.net
try latest CVS. resubmit if the problem is still there!

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 18:01:29 2025 UTC