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
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: 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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 20:01:45 2024 UTC