- Package:
- php-http-request
- Source:
- php-http-request
- Submitter:
- Juha Heinanen
- Date:
- 2022-07-16 18:33:10 UTC
- Severity:
- grave
When I try to open a web page implemented using PHP, I get error
[Fri Apr 14 20:04:15.147463 2017] [:error] [pid 977] [client ::1:48700] PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /usr/share/php/HTTP/Request.php on line 412
The offending line is here:
function setURL($url)
{
$this->_url = &new Net_URL($url, $this->_useBrackets);
This page used to work on Jessie, but now fails on Stretch.
That is due to a backwards incompatible change in PHP 7.0, see <http://php.net/manual/en/migration70.incompatible.php#migration70.incompatible.other.new-by-ref>: | The result of the new statement can no longer be | assigned to a variable by reference: I've attached a patch, but it would be better to switch to HTTP/Request2, I think. Regards, -thh
The previous patch removed one "&" too much. Fixed patch attached.
Hello,
same error is in Debian Buster:
PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /usr/share/php/HTTP/Request.php on line 412
Why is this dead package in Debian Buster, Bullseye and Sid?
Correct solution is remove this package from Debian.
Best Regards Jan Fuchs
Dear submitter, as the package php-http-request has just been removed from the Debian archive unstable we hereby close the associated bug reports. We are sorry that we couldn't deal with your issue properly. For details on the removal, please see https://bugs.debian.org/1015140 The version of this package that was in Debian prior to this removal can still be found using http://snapshot.debian.org/. Please note that the changes have been done on the master archive and will not propagate to any mirrors until the next dinstall run at the earliest. This message was generated automatically; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org. Debian distribution maintenance software pp. Thorsten Alteholz (the ftpmaster behind the curtain)