Your message dated Sat, 23 Oct 2010 01:11:37 +0800
with message-id <4cc1c5c9.8090...@goirand.fr>
and subject line Fixed a long time ago
has caused the Debian Bug report #580383,
regarding php-xml-parser uses deprecated eregi and reference of new object
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
580383: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580383
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Subject: php-xml-parser uses deprecated eregi and reference of new object
Package: php-xml-parser
Version: 1.3.0-1
Severity: important
Hi,
As per subject and:
http://pear.php.net/bugs/bug.php?id=16567
I have written a small patch for replacing the eregi calls, and as the
author didn't want to break php4 compatibility, I did some version
checkings. As I'm also proposing to the upstream author to use the
patch, I have sent him as copy of this entry.
Note that the attached patch will fix the eregi calls, but NOT the
return by reference of a new object line 616 (on the 1.3.2) or 633 (on
version 1.3.0 that is currently packaged in Debian). This issue must be
solved too, I'll let the maintainer or the upstream find a solution.
Best would be that the upstream author fix his PEAR package and release
an 1.3.3, so that we could package it into Debian. But if this is not
done upstream, please have this fixed for Squeeze (at least the eregi
stuffs, the rest is just when there's errors, so it's less of an issue).
Thomas
-- System Information:
Debian Release: 5.0.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-4-xen-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--- Parser.php.orig 2010-05-05 23:48:46.000000000 +0800
+++ Parser.php 2010-05-06 00:10:04.000000000 +0800
@@ -417,7 +417,15 @@
/**
* check, if file is a remote file
*/
- if (eregi('^(http|ftp)://', substr($file, 0, 10))) {
+ $regexp = '^(http|ftp)://';
+ $file_start = substr($file, 0, 10);
+ if (version_compare( phpversion(), '5.3.0') >= 0){
+ $check_result = prereg_match( "/" . $regexp . "/i" , $file_start);
+ }else{
+ $check_result = eregi( $regexp , $file_start);
+ }
+
+ if ( $check_result ) {
if (!ini_get('allow_url_fopen')) {
return $this->
raiseError('Remote files cannot be parsed, as safe mode is enabled.',
@@ -474,16 +482,25 @@
if (is_resource($fp)) {
$this->fp = $fp;
return true;
- } elseif (eregi('^[a-z]+://', substr($fp, 0, 10))) {
- // see if it's an absolute URL (has a scheme at the beginning)
- return $this->setInputFile($fp);
- } elseif (file_exists($fp)) {
- // see if it's a local file
- return $this->setInputFile($fp);
- } else {
- // it must be a string
- $this->fp = $fp;
- return true;
+ }else{
+ $regexp = '^[a-z]+://';
+ $check_string = substr($fp, 0, 10);
+ if (version_compare( phpversion(), '5.3.0') >= 0){
+ $check_result = prereg_match( "/" . $regexp . "/i" , $check_string);
+ }else{
+ $check_result = eregi( $regexp , $check_string);
+ }
+ if ($check_result) {
+ // see if it's an absolute URL (has a scheme at the beginning)
+ return $this->setInputFile($fp);
+ } elseif (file_exists($fp)) {
+ // see if it's a local file
+ return $this->setInputFile($fp);
+ } else {
+ // it must be a string
+ $this->fp = $fp;
+ return true;
+ }
}
return $this->raiseError('Illegal input format',
--- End Message ---
--- Begin Message ---
This one has been fixed a long time ago. Sorry that I didn't look close
enough to the bug tracker.
Thomas
--- End Message ---