#49879 [Bgs]: ERROR READING A LONG XML

2009-10-15 Thread bbarnett at gt dot co dot cr
 ID:   49879
 User updated by:  bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Bogus
 Bug Type: SimpleXML related
 Operating System: WServer 2K3
 PHP Version:  5.2.11
 New Comment:

I solved with the information that you bring me

Thank you much


Previous Comments:


[2009-10-15 14:29:10] der...@php.net

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

That line (PITBULL PRO) contains the A0 character, which is not
valid UTF-8. Either fix your XML, or set that you have the iso-8859-1
encoding. This is not a bug.



[2009-10-15 14:18:02] bbarnett at gt dot co dot cr

You can download the xml file from: 
https://201.199.26.154/xml/ins-estilos.txt

Thanks for your help



[2009-10-15 14:08:48] bbarnett at gt dot co dot cr

I found a PHP script to view the xml error:
';
}

libxml_clear_errors();

}
?>
The error is: 
Fatal Error 9: Input is not proper UTF-8, indicate encoding ! Bytes:
0xA0 0x50 0x52 0x4F Line: 92244 Column: 24



[2009-10-15 13:30:55] phpwnd at gmail dot com

Post the XML file somewhere (pastebin for example) otherwise it's
really hard to tell, especially if you don't receive an error message.



[2009-10-14 19:25:53] bbarnett at gt dot co dot cr

Description:

I have a long XML that I recieve from another system, but this XML has
more than 3 records (tag), and when I try to read it PHP can't do
it.

If you need the XML data, I can send it to the e-mail that you send me.

Reproduce code:
---
$xml= simplexml_load_string(utf8_decode(trim($xmlrecieved)));
if (!$xml ){
print 'MSG-20: Se detecto una respuesta invalida del INS '; die();
}

Expected result:

I need to process the data in the XML to update a database table.

Actual result:
--
PHP can't read it.





-- 
Edit this bug report at http://bugs.php.net/?id=49879&edit=1



#49879 [Opn]: ERROR READING A LONG XML

2009-10-15 Thread bbarnett at gt dot co dot cr
 ID:   49879
 User updated by:  bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Open
 Bug Type: SimpleXML related
 Operating System: WServer 2K3
 PHP Version:  5.2.11
 New Comment:

You can download the xml file from: 
https://201.199.26.154/xml/ins-estilos.txt

Thanks for your help


Previous Comments:


[2009-10-15 14:08:48] bbarnett at gt dot co dot cr

I found a PHP script to view the xml error:
';
}

libxml_clear_errors();

}
?>
The error is: 
Fatal Error 9: Input is not proper UTF-8, indicate encoding ! Bytes:
0xA0 0x50 0x52 0x4F Line: 92244 Column: 24



[2009-10-15 13:30:55] phpwnd at gmail dot com

Post the XML file somewhere (pastebin for example) otherwise it's
really hard to tell, especially if you don't receive an error message.



[2009-10-14 19:25:53] bbarnett at gt dot co dot cr

Description:

I have a long XML that I recieve from another system, but this XML has
more than 3 records (tag), and when I try to read it PHP can't do
it.

If you need the XML data, I can send it to the e-mail that you send me.

Reproduce code:
---
$xml= simplexml_load_string(utf8_decode(trim($xmlrecieved)));
if (!$xml ){
print 'MSG-20: Se detecto una respuesta invalida del INS '; die();
}

Expected result:

I need to process the data in the XML to update a database table.

Actual result:
--
PHP can't read it.





-- 
Edit this bug report at http://bugs.php.net/?id=49879&edit=1



#49879 [Opn]: ERROR READING A LONG XML

2009-10-15 Thread bbarnett at gt dot co dot cr
 ID:   49879
 User updated by:  bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Open
 Bug Type: SimpleXML related
 Operating System: WServer 2K3
 PHP Version:  5.2.11
 New Comment:

I found a PHP script to view the xml error:
';
}

libxml_clear_errors();

}
?>
The error is: 
Fatal Error 9: Input is not proper UTF-8, indicate encoding ! Bytes:
0xA0 0x50 0x52 0x4F Line: 92244 Column: 24


Previous Comments:


[2009-10-15 13:30:55] phpwnd at gmail dot com

Post the XML file somewhere (pastebin for example) otherwise it's
really hard to tell, especially if you don't receive an error message.



[2009-10-14 19:25:53] bbarnett at gt dot co dot cr

Description:

I have a long XML that I recieve from another system, but this XML has
more than 3 records (tag), and when I try to read it PHP can't do
it.

If you need the XML data, I can send it to the e-mail that you send me.

Reproduce code:
---
$xml= simplexml_load_string(utf8_decode(trim($xmlrecieved)));
if (!$xml ){
print 'MSG-20: Se detecto una respuesta invalida del INS '; die();
}

Expected result:

I need to process the data in the XML to update a database table.

Actual result:
--
PHP can't read it.





-- 
Edit this bug report at http://bugs.php.net/?id=49879&edit=1



#49879 [NEW]: ERROR READING A LONG XML

2009-10-14 Thread bbarnett at gt dot co dot cr
From: bbarnett at gt dot co dot cr
Operating system: WServer 2K3
PHP version:  5.2.11
PHP Bug Type: SimpleXML related
Bug description:  ERROR READING A LONG XML 

Description:

I have a long XML that I recieve from another system, but this XML has
more than 3 records (tag), and when I try to read it PHP can't do it.

If you need the XML data, I can send it to the e-mail that you send me.

Reproduce code:
---
$xml= simplexml_load_string(utf8_decode(trim($xmlrecieved)));
if (!$xml ){
print 'MSG-20: Se detecto una respuesta invalida del INS '; die();
}

Expected result:

I need to process the data in the XML to update a database table.

Actual result:
--
PHP can't read it.

-- 
Edit bug report at http://bugs.php.net/?id=49879&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49879&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49879&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49879&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49879&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49879&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49879&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=49879&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=49879&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=49879&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=49879&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=49879&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=49879&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=49879&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49879&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=49879&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=49879&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=49879&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=49879&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=49879&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=49879&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=49879&r=mysqlcfg



#48096 [Com]: Error reading XML string

2009-04-29 Thread bbarnett at gt dot co dot cr
 ID:   48096
 Comment by:   bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Feedback
 Bug Type: DOM XML related
 Operating System: Windows 2003 Server R2
 PHP Version:  5.2.9
 New Comment:

This is the function that I use to complete the length of the string
function llenacampo($valor,$tamano,$llenado,$justificado){
// Esta funcion devuelve el valor basado en los parametros para ser
agregado en la trama
$devuelve='';
if ($justificado=='derecha'){
//Llena el campo de derecha a izquierda
$cuanto=$tamano-strlen(trim($valor));
for ($i=0;$i<$cuanto;$i++){
$devuelve.=$llenado;
}
$devuelve.=$valor;
} elseif ($justificado=='izquierda'){
//Llena el campo de derecha a izquierda
$devuelve.=$valor;
$cuanto=$tamano-strlen(trim($valor));
for ($i=0;$i<$cuanto;$i++){
$devuelve.=$llenado;
}
}   
return $devuelve;
}


Previous Comments:


[2009-04-28 11:57:32] rricha...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

Included script does not run because you are using functions and 
variables that are not included here. As I said before this is an 
encoding issue and I would bet it due to the values of them.





----

[2009-04-28 06:44:37] bbarnett at gt dot co dot cr

This is an example of the XML string:


  2
  2603460081
  9787
  82108608
  9
  003930
  1400
  20090427
  20090428


----

[2009-04-28 06:36:40] bbarnett at gt dot co dot cr

Description:

I'm receiving and errors when I try to read and XML string, previously
generated by my code.



Reproduce code:
---
$doc = new DOMDocument('1.0'); $doc->formatOutput = true;
$root = $doc->createElement('X_A_PagoGen'); $root =
$doc->appendChild($root);   
$title = $doc->createElement('Banco'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($codigobanco)); $text =
$title->appendChild($text); 
$title = $doc->createElement('Localizacion'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($localizacion)); $text =
$title->appendChild($text); 
$title = $doc->createElement('NotaCredito'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(llenacampo(trim($remesa),12,'0','derecha')); $text
= $title->appendChild($text);   
$title = $doc->createElement('Correlativo'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($factura)); $text =
$title->appendChild($text); 
$title = $doc->createElement('Self'); $title =
$root->appendChild($title); $text = $doc->createTextNode(trim($self));
$text = $title->appendChild($text); 
$title = $doc->createElement('Monto'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(llenacampo(trim($monto),10,'0','derecha')); $text =
$title->appendChild($text); 
$title = $doc->createElement('Agencia'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($recaudadorCNFL)); $text =
$title->appendChild($text); 
$title = $doc->createElement('FechaPago'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim(fecha1())); $text =
$title->appendChild($text); 
$title = $doc->createElement('FechaCaja'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($deposito)); $text =
$title->appendChild($text); 
$tramaxml=$doc->saveXML();
$xml2= simplexml_load_string(trim($tramaxml));

Expected result:

XML Object

Actual result:
--
Error: 
Fatal Error 73: Couldn't find end of Start Tag Fech line 10 Line: 10
Column: 8

Fatal Error 77: Premature end of data in tag X_A_PagoGen line 2 Line:
10 Column: 8





-- 
Edit this bug report at http://bugs.php.net/?id=48096&edit=1



#48096 [Com]: Error reading XML string

2009-04-27 Thread bbarnett at gt dot co dot cr
 ID:   48096
 Comment by:   bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Open
 Bug Type: DOM XML related
 Operating System: Windows 2003 Server R2
 PHP Version:  5.2.9
 New Comment:

This is an example of the XML string:


  2
  2603460081
  9787
  82108608
  9
  003930
  1400
  20090427
  20090428



Previous Comments:


[2009-04-28 06:36:40] bbarnett at gt dot co dot cr

Description:

I'm receiving and errors when I try to read and XML string, previously
generated by my code.



Reproduce code:
---
$doc = new DOMDocument('1.0'); $doc->formatOutput = true;
$root = $doc->createElement('X_A_PagoGen'); $root =
$doc->appendChild($root);   
$title = $doc->createElement('Banco'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($codigobanco)); $text =
$title->appendChild($text); 
$title = $doc->createElement('Localizacion'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($localizacion)); $text =
$title->appendChild($text); 
$title = $doc->createElement('NotaCredito'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(llenacampo(trim($remesa),12,'0','derecha')); $text
= $title->appendChild($text);   
$title = $doc->createElement('Correlativo'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($factura)); $text =
$title->appendChild($text); 
$title = $doc->createElement('Self'); $title =
$root->appendChild($title); $text = $doc->createTextNode(trim($self));
$text = $title->appendChild($text); 
$title = $doc->createElement('Monto'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(llenacampo(trim($monto),10,'0','derecha')); $text =
$title->appendChild($text); 
$title = $doc->createElement('Agencia'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($recaudadorCNFL)); $text =
$title->appendChild($text); 
$title = $doc->createElement('FechaPago'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim(fecha1())); $text =
$title->appendChild($text); 
$title = $doc->createElement('FechaCaja'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($deposito)); $text =
$title->appendChild($text); 
$tramaxml=$doc->saveXML();
$xml2= simplexml_load_string(trim($tramaxml));

Expected result:

XML Object

Actual result:
--
Error: 
Fatal Error 73: Couldn't find end of Start Tag Fech line 10 Line: 10
Column: 8

Fatal Error 77: Premature end of data in tag X_A_PagoGen line 2 Line:
10 Column: 8





-- 
Edit this bug report at http://bugs.php.net/?id=48096&edit=1



#48096 [NEW]: Error reading XML string

2009-04-27 Thread bbarnett at gt dot co dot cr
From: bbarnett at gt dot co dot cr
Operating system: Windows 2003 Server R2
PHP version:  5.2.9
PHP Bug Type: DOM XML related
Bug description:  Error reading XML string

Description:

I'm receiving and errors when I try to read and XML string, previously
generated by my code.



Reproduce code:
---
$doc = new DOMDocument('1.0'); $doc->formatOutput = true;
$root = $doc->createElement('X_A_PagoGen'); $root =
$doc->appendChild($root);   
$title = $doc->createElement('Banco'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($codigobanco)); $text =
$title->appendChild($text); 
$title = $doc->createElement('Localizacion'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($localizacion)); $text =
$title->appendChild($text); 
$title = $doc->createElement('NotaCredito'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(llenacampo(trim($remesa),12,'0','derecha')); $text =
$title->appendChild($text); 
$title = $doc->createElement('Correlativo'); $title =
$root->appendChild($title); $text = $doc->createTextNode(trim($factura));
$text = $title->appendChild($text); 
$title = $doc->createElement('Self'); $title = $root->appendChild($title);
$text = $doc->createTextNode(trim($self)); $text =
$title->appendChild($text); 
$title = $doc->createElement('Monto'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(llenacampo(trim($monto),10,'0','derecha')); $text =
$title->appendChild($text); 
$title = $doc->createElement('Agencia'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($recaudadorCNFL)); $text =
$title->appendChild($text); 
$title = $doc->createElement('FechaPago'); $title =
$root->appendChild($title); $text = $doc->createTextNode(trim(fecha1()));
$text = $title->appendChild($text); 
$title = $doc->createElement('FechaCaja'); $title =
$root->appendChild($title); $text = $doc->createTextNode(trim($deposito));
$text = $title->appendChild($text); 
$tramaxml=$doc->saveXML();
$xml2= simplexml_load_string(trim($tramaxml));

Expected result:

XML Object

Actual result:
--
Error: 
Fatal Error 73: Couldn't find end of Start Tag Fech line 10 Line: 10
Column: 8

Fatal Error 77: Premature end of data in tag X_A_PagoGen line 2 Line: 10
Column: 8

-- 
Edit bug report at http://bugs.php.net/?id=48096&edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48096&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48096&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48096&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48096&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48096&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48096&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=48096&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=48096&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=48096&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=48096&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=48096&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=48096&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=48096&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=48096&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=48096&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=48096&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=48096&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=48096&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=48096&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=48096&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=48096&r=mysqlcfg



#47953 [Bgs]: Error reading XML string

2009-04-21 Thread bbarnett at gt dot co dot cr
 ID:   47953
 User updated by:  bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Bogus
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

I don't know why this issue was clasified as bogus, because its a PHP
error.

I wrote again the code to generate the XML that is read it in other
company without problem, but when I try to read it, I'm receiving the
same error reported before.

There are not hidden characters that I put like Richards wrote before.

Please help me with this problem

// Crea objeto XML
$doc = new DOMDocument('1.0'); $doc->formatOutput = true;
$root = $doc->createElement('X_A_PagoGen'); 
$root = $doc->appendChild($root);

$title = $doc->createElement('Banco'); 
$title = $root->appendChild($title);
$text = $doc->createTextNode(trim($codigobanco)); 
$text = $title->appendChild($text);

$title = $doc->createElement('Localizacion'); 
$title = $root->appendChild($title);
$text = $doc->createTextNode(trim($localizacion)); 
$text = $title->appendChild($text);

$title = $doc->createElement('NotaCredito'); 
$title = $root->appendChild($title);
$text =
$doc->createTextNode(llenacampo(trim($remesa),12,'0','derecha')); 
$text = $title->appendChild($text);

$title = $doc->createElement('Correlativo'); 
$title = $root->appendChild($title);
$text = $doc->createTextNode(trim($factura)); 
$text = $title->appendChild($text);

$title = $doc->createElement('Self'); 
$title = $root->appendChild($title);
$text = $doc->createTextNode(trim($self)); 
$text = $title->appendChild($text);

$title = $doc->createElement('Monto'); 
$title = $root->appendChild($title);
$text =
$doc->createTextNode(llenacampo(trim($monto),10,'0','derecha')); 
$text = $title->appendChild($text);

$title = $doc->createElement('Agencia'); 
$title = $root->appendChild($title);
$text = $doc->createTextNode(trim($recaudadorCNFL)); 
$text = $title->appendChild($text); 

$title = $doc->createElement('FechaPago'); 
$title = $root->appendChild($title);
$text = $doc->createTextNode(trim(fecha1())); 
$text = $title->appendChild($text); 

$title = $doc->createElement('FechaCaja'); 
$title = $root->appendChild($title);
        $text = $doc->createTextNode(trim($deposito)); 
$text = $title->appendChild($text); 

$tramaxml=$doc->saveXML();


Previous Comments:


[2009-04-15 17:46:42] bbarnett at gt dot co dot cr

Excuse too many questions, but I need to resolve this.

if is this true, why if is the same provider for this string in one
case works and in the other none???

Thank's for your help :)

--------------------

[2009-04-15 17:10:14] rricha...@php.net

Not a bug. You have bad data - most likely an invisible char.



[2009-04-15 15:58:53] bbarnett at gt dot co dot cr

I'm adding the XML head to the string like this



  2
  7901160655
  000000009726
  79613565
  5
  010605
  1400
  20090102
  20090105

But I'm receiving the same result. 

In the next case the function read the XML without problem


  7901160655




[2009-04-15 15:40:06] bbarnett at gt dot co dot cr

I try without the utf8_decode, but I'm receiving the same result.

$xml2= simplexml_load_string(trim($reg[0]));

Can you help me?



[2009-04-15 11:55:16] rricha...@php.net

There's bad data somewhere in your XML. No idea what encoding the data

is, but converting it to ISO-8859-1 without an XML declaration using 
that encoding is a sure path to disaster.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/47953

-- 
Edit this bug report at http://bugs.php.net/?id=47953&edit=1



#47953 [Bgs]: Error reading XML string

2009-04-15 Thread bbarnett at gt dot co dot cr
 ID:   47953
 User updated by:  bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Bogus
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

Excuse too many questions, but I need to resolve this.

if is this true, why if is the same provider for this string in one
case works and in the other none???

Thank's for your help :)


Previous Comments:


[2009-04-15 17:10:14] rricha...@php.net

Not a bug. You have bad data - most likely an invisible char.



[2009-04-15 15:58:53] bbarnett at gt dot co dot cr

I'm adding the XML head to the string like this



  2
  7901160655
  9726
  79613565
  5
  010605
  1400
  20090102
  20090105

But I'm receiving the same result. 

In the next case the function read the XML without problem


  7901160655




[2009-04-15 15:40:06] bbarnett at gt dot co dot cr

I try without the utf8_decode, but I'm receiving the same result.

$xml2= simplexml_load_string(trim($reg[0]));

Can you help me?



[2009-04-15 11:55:16] rricha...@php.net

There's bad data somewhere in your XML. No idea what encoding the data

is, but converting it to ISO-8859-1 without an XML declaration using 
that encoding is a sure path to disaster.

----

[2009-04-12 00:07:46] bbarnett at gt dot co dot cr

This is a part of the code that I'm using:
",1);
} 
?>



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/47953

-- 
Edit this bug report at http://bugs.php.net/?id=47953&edit=1



#47953 [Bgs]: Error reading XML string

2009-04-15 Thread bbarnett at gt dot co dot cr
 ID:   47953
 User updated by:  bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Bogus
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

I'm adding the XML head to the string like this



  2
  7901160655
  9726
  79613565
  5
  010605
  1400
  20090102
  20090105

But I'm receiving the same result. 

In the next case the function read the XML without problem


  7901160655



Previous Comments:


[2009-04-15 15:40:06] bbarnett at gt dot co dot cr

I try without the utf8_decode, but I'm receiving the same result.

$xml2= simplexml_load_string(trim($reg[0]));

Can you help me?



[2009-04-15 11:55:16] rricha...@php.net

There's bad data somewhere in your XML. No idea what encoding the data

is, but converting it to ISO-8859-1 without an XML declaration using 
that encoding is a sure path to disaster.



[2009-04-12 00:07:46] bbarnett at gt dot co dot cr

This is a part of the code that I'm using:
",1);
} 
?>

----

[2009-04-12 00:03:21] bbarnett at gt dot co dot cr

This is an example of the XML string that I'm trying to read

  2
  8203261610
  9770
  80782584
  9
  011930
  1400
  20090216
  20090217


--------

[2009-04-11 23:49:39] bbarnett at gt dot co dot cr

Description:

I'm receiving and error when I try to read and XML string. The error
is: Premature end of data in tag FechaPago line 9 Line: 9

Reproduce code:
---
$xml2= simplexml_load_string(utf8_decode(trim($reg[0])));

Expected result:

An XML object

Actual result:
--
An Error.





-- 
Edit this bug report at http://bugs.php.net/?id=47953&edit=1



#47953 [Bgs]: Error reading XML string

2009-04-15 Thread bbarnett at gt dot co dot cr
 ID:   47953
 User updated by:  bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Bogus
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

I try without the utf8_decode, but I'm receiving the same result.

$xml2= simplexml_load_string(trim($reg[0]));

Can you help me?


Previous Comments:


[2009-04-15 11:55:16] rricha...@php.net

There's bad data somewhere in your XML. No idea what encoding the data

is, but converting it to ISO-8859-1 without an XML declaration using 
that encoding is a sure path to disaster.



[2009-04-12 00:07:46] bbarnett at gt dot co dot cr

This is a part of the code that I'm using:
",1);
} 
?>



[2009-04-12 00:03:21] bbarnett at gt dot co dot cr

This is an example of the XML string that I'm trying to read

  2
  8203261610
  9770
  80782584
  9
  011930
  1400
  20090216
  20090217




[2009-04-11 23:49:39] bbarnett at gt dot co dot cr

Description:

I'm receiving and error when I try to read and XML string. The error
is: Premature end of data in tag FechaPago line 9 Line: 9

Reproduce code:
---
$xml2= simplexml_load_string(utf8_decode(trim($reg[0])));

Expected result:

An XML object

Actual result:
--
An Error.





-- 
Edit this bug report at http://bugs.php.net/?id=47953&edit=1



#47953 [Fbk->Opn]: Error reading XML string

2009-04-14 Thread bbarnett at gt dot co dot cr
 ID:   47953
 User updated by:  bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
-Status:   Feedback
+Status:   Open
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

Hi.

I want to know if you need more information about this issue???

Thank you.


Previous Comments:


[2009-04-12 00:07:46] bbarnett at gt dot co dot cr

This is a part of the code that I'm using:
",1);
} 
?>



[2009-04-12 00:03:21] bbarnett at gt dot co dot cr

This is an example of the XML string that I'm trying to read

  2
  8203261610
  9770
  80782584
  9
  011930
  1400
  20090216
  20090217




[2009-04-11 23:51:46] j...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2009-04-11 23:49:39] bbarnett at gt dot co dot cr

Description:

I'm receiving and error when I try to read and XML string. The error
is: Premature end of data in tag FechaPago line 9 Line: 9

Reproduce code:
---
$xml2= simplexml_load_string(utf8_decode(trim($reg[0])));

Expected result:

An XML object

Actual result:
--
An Error.





-- 
Edit this bug report at http://bugs.php.net/?id=47953&edit=1



#47953 [Com]: Error reading XML string

2009-04-11 Thread bbarnett at gt dot co dot cr
 ID:   47953
 Comment by:   bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Feedback
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

This is a part of the code that I'm using:
",1);
} 
?>


Previous Comments:


[2009-04-12 00:03:21] bbarnett at gt dot co dot cr

This is an example of the XML string that I'm trying to read

  2
  8203261610
  9770
  80782584
  9
  011930
  1400
  20090216
  20090217




[2009-04-11 23:51:46] j...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2009-04-11 23:49:39] bbarnett at gt dot co dot cr

Description:

I'm receiving and error when I try to read and XML string. The error
is: Premature end of data in tag FechaPago line 9 Line: 9

Reproduce code:
---
$xml2= simplexml_load_string(utf8_decode(trim($reg[0])));

Expected result:

An XML object

Actual result:
--
An Error.





-- 
Edit this bug report at http://bugs.php.net/?id=47953&edit=1



#47953 [Com]: Error reading XML string

2009-04-11 Thread bbarnett at gt dot co dot cr
 ID:   47953
 Comment by:   bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Feedback
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

This is an example of the XML string that I'm trying to read

  2
  8203261610
  9770
  80782584
  9
  011930
  1400
  20090216
  20090217



Previous Comments:


[2009-04-11 23:51:46] j...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2009-04-11 23:49:39] bbarnett at gt dot co dot cr

Description:

I'm receiving and error when I try to read and XML string. The error
is: Premature end of data in tag FechaPago line 9 Line: 9

Reproduce code:
---
$xml2= simplexml_load_string(utf8_decode(trim($reg[0])));

Expected result:

An XML object

Actual result:
--
An Error.





-- 
Edit this bug report at http://bugs.php.net/?id=47953&edit=1



#47953 [NEW]: Error reading XML string

2009-04-11 Thread bbarnett at gt dot co dot cr
From: bbarnett at gt dot co dot cr
Operating system: WXP
PHP version:  5.2.9
PHP Bug Type: *XML functions
Bug description:  Error reading XML string

Description:

I'm receiving and error when I try to read and XML string. The error is:
Premature end of data in tag FechaPago line 9 Line: 9

Reproduce code:
---
$xml2= simplexml_load_string(utf8_decode(trim($reg[0])));

Expected result:

An XML object

Actual result:
--
An Error.

-- 
Edit bug report at http://bugs.php.net/?id=47953&edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47953&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47953&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47953&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47953&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47953&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47953&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=47953&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=47953&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=47953&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=47953&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=47953&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=47953&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=47953&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47953&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=47953&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=47953&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=47953&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=47953&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=47953&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=47953&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=47953&r=mysqlcfg



#47455 [NEW]: DON'T READ XML WITH SPANISH CHARACTERS

2009-02-19 Thread bbarnett at gt dot co dot cr
From: bbarnett at gt dot co dot cr
Operating system: Windows 2003 Server R2
PHP version:  5.2.9RC3
PHP Bug Type: SimpleXML related
Bug description:  DON'T READ XML WITH SPANISH CHARACTERS

Description:

I'm try to read XML response from a Web Service where one of it's tag have
SPANISH characters and the function that I'm using give me a fatal error

Reproduce code:
---
$xml=new
SimpleXMLElement(utf8_decode($l_stResult['ServicioRecibosCobroResult']));

Expected result:

Something like THIS

object(SimpleXMLElement)#12 (2) { ["Encabezado"]=>
object(SimpleXMLElement)#8 (6) { ["Resultado"]=> string(4) ""
["Mensaje"]=> string(15) "DATOS CORRECTOS" ["Servicio"]=> string(7)
"3260304" ["CantidadRecibos"]=> string(4) "0001" ["Identificacion"]=>
string(14) "00" ["Cliente"]=> string(25) "ELIZABETH VALLEJOS
CERDAS" } ["Recibos"]=> object(SimpleXMLElement)#14 (1) { ["Recibo"]=>
object(SimpleXMLElement)#16 (5) { ["NIR"]=> string(18) "032603040121022008"
["Monto"]=> string(6) "333000" ["Moneda"]=> string(3) "CRC" ["Fact"]=>
string(8) "21022008" ["Venc"]=> string(8) "06032008" } } } 

Actual result:
--
string(436) "DATOS CORRECTOS5272627000127010288042303ANG¿LICA SUAREZ
VALLEJOS052726270108022008712400CRC0802200822022008" 

-- 
Edit bug report at http://bugs.php.net/?id=47455&edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47455&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47455&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47455&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47455&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47455&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47455&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=47455&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=47455&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=47455&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=47455&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=47455&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=47455&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=47455&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47455&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=47455&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=47455&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=47455&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=47455&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=47455&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=47455&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=47455&r=mysqlcfg



#47292 [Bgs]: I can not read the socket answer

2009-02-04 Thread bbarnett at gt dot co dot cr
 ID:   47292
 User updated by:  bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Bogus
 Bug Type: Sockets related
 Operating System: Windows 2003 Server R2
 PHP Version:  5.2.8
 New Comment:

Thank you for your answer, but I need some tip, because a wrote my
request in many forums but nobody answer me about how to resolve it.

You are my last option to ask.

Thank's


Previous Comments:


[2009-02-03 22:12:16] j...@php.net

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.





[2009-02-03 16:35:57] bbarnett at gt dot co dot cr

Description:

I'm trying to read the answer of a socket after I wrote the information
that I must send before, but the application freeze and don't send me
any message.

I'm monitoring the port using TCPVIEWER and I can see while the
conection is established.

Using CLARION 6 I don't have any problem comunicating with the socket
(writing and reading) my  problem is only with PHP.

I don't now if this is a bug, but after read many information about how
to use the socket I'm giving up.

Please, I need your help because we're developing a new software that
comunicate with many socket's server to pay public services in my
country and in actualy we are using Clarion 6, but with this environment
we don't have enough support.

Reproduce code:
---
$puerto_servicio = 3260;$direccion = '172.25.10.5';
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($socket === false) {echo "socket_create() falló: motivo: " .
socket_strerror(socket_last_error()) . ""; die();
} else {echo "OK.";}
$resultado = socket_connect($socket, $direccion, $puerto_servicio);
if ($resultado === false) {
echo "socket_connect() falló.Motivo: ($resultado) " .
 socket_strerror(socket_last_error($socket)) . "";
} else {echo "OK.";}
$entrada=$trama800; $salida = '';
if (!socket_write($socket, $entrada, strlen($entrada))) {
echo "socket_connect() falló.Motivo: ($resultado) " .
 socket_strerror(socket_last_error($socket)) . "";}
if (!$salida = socket_read($socket, 426)) {
echo "socket_connect() falló en lectura.Motivo: ($resultado) " .
 socket_strerror(socket_last_error($socket)) . "";}
socket_close($socket);

Expected result:

I wait to recieve a string with 426 chars

Actual result:
--
frezze the browser





-- 
Edit this bug report at http://bugs.php.net/?id=47292&edit=1



#47292 [NEW]: I can not read the socket answer

2009-02-03 Thread bbarnett at gt dot co dot cr
From: bbarnett at gt dot co dot cr
Operating system: Windows 2003 Server R2
PHP version:  5.2.8
PHP Bug Type: Sockets related
Bug description:  I can not read the socket answer

Description:

I'm trying to read the answer of a socket after I wrote the information
that I must send before, but the application freeze and don't send me any
message.

I'm monitoring the port using TCPVIEWER and I can see while the conection
is established.

Using CLARION 6 I don't have any problem comunicating with the socket
(writing and reading) my  problem is only with PHP.

I don't now if this is a bug, but after read many information about how to
use the socket I'm giving up.

Please, I need your help because we're developing a new software that
comunicate with many socket's server to pay public services in my country
and in actualy we are using Clarion 6, but with this environment we don't
have enough support.

Reproduce code:
---
$puerto_servicio = 3260;$direccion = '172.25.10.5';
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($socket === false) {echo "socket_create() falló: motivo: " .
socket_strerror(socket_last_error()) . ""; die();
} else {echo "OK.";}
$resultado = socket_connect($socket, $direccion, $puerto_servicio);
if ($resultado === false) {
echo "socket_connect() falló.Motivo: ($resultado) " .
 socket_strerror(socket_last_error($socket)) . "";
} else {echo "OK.";}
$entrada=$trama800; $salida = '';
if (!socket_write($socket, $entrada, strlen($entrada))) {
echo "socket_connect() falló.Motivo: ($resultado) " .
 socket_strerror(socket_last_error($socket)) . "";}
if (!$salida = socket_read($socket, 426)) {
echo "socket_connect() falló en lectura.Motivo: ($resultado) " .
 socket_strerror(socket_last_error($socket)) . "";}
socket_close($socket);

Expected result:

I wait to recieve a string with 426 chars

Actual result:
--
frezze the browser

-- 
Edit bug report at http://bugs.php.net/?id=47292&edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47292&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47292&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47292&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47292&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47292&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47292&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=47292&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=47292&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=47292&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=47292&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=47292&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=47292&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=47292&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47292&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=47292&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=47292&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=47292&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=47292&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=47292&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=47292&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=47292&r=mysqlcfg