Closed avggeek closed 8 years ago
Hi,
I am facing the same issue on fresh php 7 installation. Has anyone found the fix?
Same issue here with Debian 8 and PHP 7.0. Any way to fix this?
PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /usr/share/php/PEAR/Frontend.php on line 91
The big problem is that the version of PEAR is not updated.
Try update PEAR: $ wget http://pear.php.net/go-pear.phar $ php go-pear.phar
@fabiorphp your solution works :)
Thanks a lot. Your solution worked for me. To be verbose, after install I had to link the pecl executable (that just got created) to previous installed pecl executabel in /usr/bin/pecl for CentOS 7 version
Dotdeb now provides a php-pear
package that is fully compatible with PHP7
I run: sudo php go-pear.phar
and then I get:
XML extension is not found after I accept all the defaults.
What am I missing ?
I'm also getting an XML Extension not found. php7.0-xml is already installed.
For the XML Extension not found error I found that installing following packages helps sudo apt-get install php-pear pkg-config php-xml php7.0-xml php-dev
@mykola-adbeat your solution worked for me. Thanks a lot!
Hello,
Per the recommended bug report format:
What is your distribution?
Debian GNU/Linux 8.4 (jessie)
What is your architecture?
amd64 on KVM (Proxmox)
Which exact PHP version are you using?
$ php -v
PHP 7.0.5-1~dotdeb+8.1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
What is the result of dpkg -l 'php*' | grep '^.i' ?
Description: I installed PHP7 on a fresh Debian Jessie install and was looking to install a PECL extension. However, the pecl binary crashes as soon I launch it with the following error message:
Parse error: syntax error, unexpected 'new' (T_NEW) in /usr/share/php/PEAR/Frontend.php on line 91
There is an identical error message in this Ubuntu bug report but the suggested fix is to install a version from Ubuntu 16.04. Any suggestions on how I could fix in this in Jessie?