ID:               39415
 User updated by:  jordi at telematictraining dot com
 Reported By:      jordi at telematictraining dot com
 Status:           Bogus
 Bug Type:         PCRE related
 Operating System: Debian GNU/Linux Stable
 PHP Version:      5.2.0
 New Comment:

Ok, thanks for pointing that out.

Just FYI on anyone that could be interested in this issue, we've sent
an e-mail to the PCRE developer to notify him this situation, although
we haven't got any response yet.


Previous Comments:
------------------------------------------------------------------------

[2006-11-09 08:54:23] [EMAIL PROTECTED]

02 Nov 2006, PHP 5.2.0
- Updated PCRE to version 6.7. (Ilia)

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

[2006-11-08 14:56:01] jordi at telematictraining dot com

This failure wasn't showing on php versions 5.1.2, 5.1.4 and 5.1.6 and
we cannot remember any PCRE library update. The only thing we updated
was php to version 5.2.0.

Besides this, once the error showed up on php 5.2.0 version, we came
back to version 5.1.6 and this failure didn't show (and it's not
showing right now, even if the PCRE lib was the one affected -a thing
that does not seem to be). We're also pretty sure this error does not
show either on 5.1.2 and 5.1.4 versions.

That's why we think this problem may be a php matter rather than a PCRE
lib one.

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

[2006-11-08 13:34:26] [EMAIL PROTECTED]

This is a limitation of PCRE library, not PHP.

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

[2006-11-08 09:52:08] jordi at telematictraining dot com

Sorry for not posting the script, here you are:

#!/usr/local/bin/php

<?php

/* Bug on the PHP 5.2.0 preg_Match_all() function? */

$pattern =
"/((field):(codigo_doa|titulo_obra|titulo_alternativo|num_serie|ejemplar_serie|ejemplares_obra|nombre_tecnica|materiales_soporte|medidas_diametro|lista_artistas|medidas_peso|medidas_resolucion|epoca_corriente|medidas_minutaje|color|sonido_canales|numero_normalizado|valor|fecha_creacion|medidas_longitud|es_firmado|exactitud_fecha|tipo_obra|tipologia_objeto|tipo_tecnica|unidades_medidas|unidades_peso|tipo_formato|nombre_formato_imagen|arquitectura|hay_sonido|sonido_nombre_formato|sonido_muestreo|sonido_amplitud|sonido_idioma_original|pais_publicacion))|((barcode):((\_[ABC]){0,1}(\((\d+)\)){0,1}(\{(codigo_doa|titulo_obra|titulo_alternativo|num_serie|ejemplar_serie|ejemplares_obra|nombre_tecnica|materiales_soporte|medidas_diametro|lista_artistas|medidas_peso|medidas_resolucion|epoca_corriente|medidas_minutaje|color|sonido_canales|numero_normalizado|valor|fecha_creacion|medidas_longitud|es_firmado|exactitud_fecha|tipo_obra|tipologia_objeto|tipo_tecnica|unidades_medidas|unidades_pe
so|tipo_formato|nombre_formato_imagen|arquitectura|hay_sonido|sonido_nombre_formato|sonido_muestreo|sonido_amplitud|sonido_idioma_original|pais_publicacion)\}){1,45}))/";

$subject = "<table width=\"100%\"> <tr> <td class=\"field_label\">Tipo
de objeto / Type of object: </td> <td
class=\"field\">field:tipologia_objeto (field:tipo_obra)</td> </tr>
<tr> <td class=\"field_label\">Objeto de arte registrado en AICOA /
Work of art registered in AICOA: </td> <td
class=\"field\">field:codigo_doa</td> </tr> <tr> <td
class=\"field_label\">Título de la obra (Título alternativo) / Title
(Alternative title): </td> <td class=\"field\">field:titulo_obra
(field:titulo_alternativo)</td> </tr> <tr> <td
class=\"field_label\">Autor / Author: </td> <td
class=\"field\">field:lista_artistas</td> </tr> <tr> <td
class=\"field_label\">Fecha realización / Date or period: </td> <td
class=\"field\">field:fecha_creacion (field:exactitud_fecha)</td> </tr>
<tr> <td class=\"field_label\">Escuela, corriente estilística / School,
art movement: </td> <td class=\"field\">field:epoca_corriente</td>
</tr> <tr> <td class=\"field_label\">Datos de la serie / Serial Number:
</td> <td class=\"field\">field:ejemplar_serie / field:ejemplares_obra
-- serie: field:num_serie</td> </tr> <tr> <td
class=\"field_label\">Características del formato / Format
characteristics: </td> <td class=\"field\">field:tipo_tecnica ,
resolución: field:medidas_resolucion</td> </tr> <tr> <td
class=\"field_label\">Técnica / Technique:</td> <td
class=\"field\">field:nombre_tecnica</td> </tr> <tr> <td
class=\"field_label\">Materiales-Soporte / Material-Support:</td> <td
class=\"field\">field:materiales_soporte</td> </tr> <tr> <td
class=\"field_label\">Medidas / dimensions:</td> <td class=\"field\">
field:medidas_longitud field:unidades_medidas // Ø
field:medidas_diametro field:unidades_medidas // field:medidas_peso
field:unidades_peso </td> </tr> <tr> <td class=\"field_label\">Firmado
/ Signed</td> <td class=\"field\">field:es_firmado</td> </tr>
</table>";

if(preg_match_all($pattern, $subject, $coincidences))
   print_r($coincidences);

?>

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

[2006-11-07 16:47:48] jordi at telematictraining dot com

The content of $pattern was line-altered (line breaks where they
shouldn't), so here's the correct one:

$pattern="/((field):(codigo_doa|titulo_obra|titulo_alternativo|num_serie|ejemplar_serie|ejemplares_obra|nombre_tecnica|materiales_soporte|medidas_diametro|lista_artistas|medidas_peso|medidas_resolucion|epoca_corriente|medidas_minutaje|color|sonido_canales|numero_normalizado|valor|fecha_creacion|medidas_longitud|es_firmado|exactitud_fecha|tipo_obra|tipologia_objeto|tipo_tecnica|unidades_medidas|unidades_peso|tipo_formato|nombre_formato_imagen|arquitectura|hay_sonido|sonido_nombre_formato|sonido_muestreo|sonido_amplitud|sonido_idioma_original|pais_publicacion))|((barcode):((\_[ABC]){0,1}(\((\d+)\)){0,1}(\{(codigo_doa|titulo_obra|titulo_alternativo|num_serie|ejemplar_serie|ejemplares_obra|nombre_tecnica|materiales_soporte|medidas_diametro|lista_artistas|medidas_peso|medidas_resolucion|epoca_corriente|medidas_minutaje|color|sonido_canales|numero_normalizado|valor|fecha_creacion|medidas_longitud|es_firmado|exactitud_fecha|tipo_obra|tipologia_objeto|tipo_tecnica|unidades_medidas|u!
 nidades_pe
so|tipo_formato|nombre_formato_imagen|arquitectura|hay_sonido|sonido_nombre_formato|sonido_muestreo|sonido_amplitud|sonido_idioma_original|pais_publicacion)\}){1,45}))/"

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

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/39415

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

Reply via email to