[Reddes.bvs-tech] [Abcd-dev] About upload and z3950 scripts

Jussara Ribeiro de Oliveira jussara.oliveira at bireme.org
Fri Nov 5 21:12:25 BRST 2010


en español se publicó en otro mensaje 


Hello everyone! 

Thanks for the contributions. After analysing the script of z3950 and the comments sent we have discovered the problem was in the functions preg_match() and preg_replace(). 

These functions are a replacement to ereg and ereg_replace in PHP 5.3 for use with regular expressions. But they have some peculiarities. For example, the following line in z3950-01.php script: 

if (ereg("^\(3,([^)]*)\)\(3,@\)$",$tagpath,$res)) { 

Need to be changed to: 

if (preg_match("/^\(3,([^)]*)\)\(3,@\)$/",$tagpath,$res)) { 

These new functions require a "/" before and after the string contents passed to the function. 

See attached the corrected scripts. Please do some tests and if errors occur, please let us know by sending the error messages and a brief description of the procedures involved in the tests. 

These changes will be included in the next patch. 

Thanks everyone! 

Jussara Ribeiro de Oliveira 
BIREME/PAHO/WHO 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.bireme.br/pipermail/reddes.bvs-tech/attachments/20101105/6cd0b189/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: upload.php
Type: application/x-php
Size: 3095 bytes
Desc: not available
Url : http://listas.bireme.br/pipermail/reddes.bvs-tech/attachments/20101105/6cd0b189/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: z3950-01.php
Type: application/x-php
Size: 13602 bytes
Desc: not available
Url : http://listas.bireme.br/pipermail/reddes.bvs-tech/attachments/20101105/6cd0b189/attachment-0003.bin 
-------------- next part --------------
_______________________________________________
Abcd-dev mailing list
Abcd-dev at listas.bireme.br
http://listas.bireme.br/mailman/listinfo/abcd-dev


More information about the Reddes.bvs-tech mailing list