gplessis / dotdeb-php

Dotdeb : PHP packages
https://www.dotdeb.org/
Other
125 stars 23 forks source link

PECL error on launch - "Parse error" #123

Closed avggeek closed 8 years ago

avggeek commented 8 years ago

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' ?

ii php-common 21-1~dotdeb+8.1 all Common files for PHP packages ii php-pear 5.6.19+dfsg-0+deb8u1 all PEAR - PHP Extension and Application Repository

ii php-readline 21-1~dotdeb+8.1 all readline module for PHP [default] ii php5-cli 5.6.19+dfsg-0+deb8u1 amd64 command-line interpreter for the php5 scripting language ii php5-common 5.6.19+dfsg-0+deb8u1 amd64 Common files for packages built from the php5 source ii php5-dev 5.6.19+dfsg-0+deb8u1 amd64 Files for PHP5 module development ii php5-json 1.3.6-1 amd64 JSON module for php5 ii php5-readline 5.6.19+dfsg-0+deb8u1 amd64 Readline module for php5 ii php7.0-apcu 5.1.3-1~dotdeb+8.1 amd64 APC User Cache for PHP ii php7.0-bz2 7.0.5-1~dotdeb+8.1 amd64 bzip2 module for PHP ii php7.0-cgi 7.0.5-1~dotdeb+8.1 amd64 server-side, HTML-embedded scripting language (CGI binary) ii php7.0-cli 7.0.5-1~dotdeb+8.1 amd64 command-line interpreter for the PHP scripting language ii php7.0-common 7.0.5-1~dotdeb+8.1 all Common files for packages built from the PHP source ii php7.0-curl 7.0.5-1~dotdeb+8.1 amd64 CURL module for PHP ii php7.0-dev 7.0.5-1~dotdeb+8.1 amd64 Files for PHP7.0 module development ii php7.0-fpm 7.0.5-1~dotdeb+8.1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary) ii php7.0-gd 7.0.5-1~dotdeb+8.1 amd64 GD module for PHP ii php7.0-intl 7.0.5-1~dotdeb+8.1 amd64 Internationalisation module for PHP ii php7.0-json 7.0.5-1~dotdeb+8.1 amd64 JSON module for PHP ii php7.0-mcrypt 7.0.5-1~dotdeb+8.1 amd64 libmcrypt module for PHP ii php7.0-mysql 7.0.5-1~dotdeb+8.1 amd64 MySQL module for PHP ii php7.0-opcache 7.0.5-1~dotdeb+8.1 amd64 Zend OpCache module for PHP ii php7.0-readline 7.0.5-1~dotdeb+8.1 amd64 readline module for PHP

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?

smaadjahangir commented 8 years ago

Hi,

I am facing the same issue on fresh php 7 installation. Has anyone found the fix?

ecsumed commented 8 years ago

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

faabiosr commented 8 years ago

The big problem is that the version of PEAR is not updated.

faabiosr commented 8 years ago

Try update PEAR: $ wget http://pear.php.net/go-pear.phar $ php go-pear.phar

Rubatharisan commented 8 years ago

@fabiorphp your solution works :)

schandrasekhar commented 8 years ago

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

gplessis commented 8 years ago

Dotdeb now provides a php-pearpackage that is fully compatible with PHP7

redbonzai commented 7 years ago

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 ?

kvron commented 7 years ago

I'm also getting an XML Extension not found. php7.0-xml is already installed.

mykola-adbeat commented 7 years ago

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

vineetgkp commented 6 years ago

@mykola-adbeat your solution worked for me. Thanks a lot!