Categories
PHP

PHP 7.0.0 is available for Jessie

On December 3rd 2015, the PHP group published PHP 7.0.0.

PHP 7.0.0 comes with a new version of the Zend Engine, numerous improvements and new features such as :

  • Improved performance: PHP 7 is up to twice as fast as PHP 5.6
  • Significantly reduced memory usage
  • Abstract Syntax Tree
  • Consistent 64-bit support
  • Improved Exception hierarchy
  • Many fatal errors converted to Exceptions
  • Secure random number generator
  • Removed old and unsupported SAPIs and extensions
  • The null coalescing operator (??)
  • Return and Scalar Type Declarations
  • Anonymous Classes
  • Zero cost asserts

The list of changes is recorded in the ChangeLog.

The migration guide is available in the PHP Manual. Please consult it for the detailed list of new features and backward incompatible changes.

I am now proud to announce that packages of PHP 7.0.0 are now available for Debian 8 “Jessie” on amd64 and i386 architectures!

On the Dotdeb side, I wanted to make things right and compatible with what will happen for Stretch. So the packaging method has been synchronized to Sid’s one in terms of naming and versioning (once again, thanks to the Debian maintainers for their awesome work!). That means that :

  • The packages of SAPI (Apache2, FPM, CLI, CGI, Embed…) and of core modules (GD, MySQL, mastering, OpCache…) are built as usual from the upstream source, and are named php7.0-* instead of just php7-*.
  • This new naming convention and packaging method will help to produce future php7.x-* packages more easily. And you could even install several PHP 7+ versions on the same server without any conflict!
  • You should remove any PHP5 packages before upgrading
  • The json and OpCache modules are now packaged separately, respectively name php7.0-json and php7.0-opcache.
  • All these packages are built using git-buildpackage and Jenkins.
  • Packages of the PECL extensions (Memcache, Memcached, Mongo, Redis, Xdebug…) are still missing and require some work from me.
  • The thread-safe version of all these packages will be published soon.

Please make sure that you understand the above PHP/Debian/Dotdeb changes and that you don’t need any of the missing features/packages. Your feedbacks are always welcome. Just make sure they are useful.

These packages have been published on the main repository for Jessie because they have new names because they shouldn’t conflict with any PHP5 installation. So to get PHP 7.0.0 , just follow the regular instructions for Jessie.

And as usual, feel free to show your support, it is always greatly appreciated, especially if we consider the high level of expectations that you all have for this new major release… 🙂

76 replies on “PHP 7.0.0 is available for Jessie”

Nice, but it would be nice, if this could be installed along side php5.6 or other version and then with a tag in the virtualsite, tell it to run php7

Hi Guillaume.

First of all many thanks for the packages, this allowed me to do some easy early testing of PHP7 with our application (with amazing results in terms of performance).
I’m in no hurry since I compiled them myself, but do you have any ETA for the PECL extensions? Do you plan on providing the extension for the old mysql_* functions (http://git.php.net/?p=pecl/database/mysql.git;a=summary)? Again, no hurry as we are months away from having php7 in production here 🙂

Hello !

After installing it got some errors (after each package installation like json or mysql for instance) :

apt-get install php7.0-json
Lecture des listes de paquets… Fait
Construction de l’arbre des dépendances
Lecture des informations d’état… Fait
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
apache2-data apache2-utils
Veuillez utiliser « apt-get autoremove » pour les supprimer.
Les NOUVEAUX paquets suivants seront installés :
php7.0-json
0 mis à jour, 1 nouvellement installés, 0 à enlever et 20 non mis à jour.
1 partiellement installés ou enlevés.
Il est nécessaire de prendre 16,9 ko dans les archives.
Après cette opération, 109 ko d’espace disque supplémentaires seront utilisés.
Réception de : 1 http://packages.dotdeb.org/ jessie/all php7.0-json amd64 7.0.0-1~dotdeb+8.1 [16,9 kB]
16,9 ko réceptionnés en 0s (24,0 ko/s)
Sélection du paquet php7.0-json précédemment désélectionné.
(Lecture de la base de données… 189641 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de …/php7.0-json_7.0.0-1~dotdeb+8.1_amd64.deb …
Dépaquetage de php7.0-json (7.0.0-1~dotdeb+8.1) …
Paramétrage de php7.0-fpm (7.0.0-1~dotdeb+8.1) …
insserv: script php7.0-fpm: service php-fpm already provided!
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: erreur de traitement du paquet php7.0-fpm (–configure) :
le sous-processus script post-installation installé a retourné une erreur de sortie d’état 1
Paramétrage de php7.0-json (7.0.0-1~dotdeb+8.1) …

Creating config file /etc/php/mods-available/json.ini with new version
Des erreurs ont été rencontrées pendant l’exécution :
php7.0-fpm
E: Sub-process /usr/bin/dpkg returned an error code (1)

The strange thing is that php7.0-fpm works …
I just don’t get why there is this message after the installation !

When i try to reconfigure it :
dpkg-reconfigure php7.0-fpm
/usr/sbin/dpkg-reconfigure: php7.0-fpm est cassé ou partiellement installé

🙁
Any idea ?

NB : sorry for the mix english/french here !

Hi.

When will php7.0-mcrypt, geoip, xmlrpc, imagick memcached available? Later this month, or you cannot predict?

Merci pour ce travail. J’ai mis à jour mon serveur avec Jessie, MariaDB et PHP7. Quand je regarde les modules, je vois bien PDO et mysqlnd mais je constate que s’il y a bien les fonctions PDO, par contre les fontions MySQLi sont absentes. (vérifié avec un test avec function_exists).
ESt-ce que ça vient du package qui a été compilé sans? Et comment faire?

I followed the instructions for Jessie, but when I execute apt-get update the sources from Dotdeb are ignored by atp. How can I fix this issue?

Really GREAT! With the help of php7.0 and opcache, the loading time of my wordpress homepage reduces by over 70%. Hope to see memcache extension soon.

since php7 fpm + nginx i have :
WARNING: [pool www] child 28584 exited on signal 11 (SIGSEGV) after

How to debug ?

I appreciate your hard work,

php-pear still depends on php5-common. Until this is fixed, we cannot install anything from PECL without manually downloading/building.

@Pierre-Louis : MySQLi est bien compilé est présent dans le paquet php7.0-mysql (dpkg -l php7.0-mysql pour t’en convaincre). Assure toi d’avoir un fichier mysqli.ini adéquat dans /etc/php, à la façon de pdo_mysql.

When I want to start a session I have this error
session_start(): open(/var/lib/php/sessions/****, O_RDWR) failed: Permission denied (13) in ****

The permissions on /var/lib/php/sessions are: drwxr-xr-x debian:staff
But on a classic PHP5.6 Jessie install, permissions on /var/lib/php5/sessions are: drwx-wx-wt root root

Do I have to change the permissions/owner? Is is a dotdeb-related issue? Is it a PHP7 issue?

Any news about wheezy support? Is this so complex – see some howtos for “compile” version for debian 7.

@Dalenys : I currently have no plan to release PHP 7 for Wheezy. The packaging scripts have a strong dependency on Apache 2.4 (Wheezy has 2.2). I’m focusing on fixing the remaining issues before anything else.

@Tim Wikler : I currently have no plan to release PHP 7 for Wheezy. The packaging scripts have a strong dependency on Apache 2.4 (Wheezy has 2.2). I’m focusing on fixing the remaining issues before anything else.

Thank you so much for making this possible! Really a great service! Please do ignore all the people that are either impatient or rude….

Hi Guillaume.

I just started doing some more serious testing with PHP 7.0 and it looks like you forgot (or maybe it’s on purpose?) to enable bz2 support. I just added the –with-bz2 line in the debian/rules file and recompiled everything and now I’ve got bz2 enabled and working. It’s amusing that when bz2 was disabled, it just was telling me to get it on pecl 🙂
The build-dep of the php7 packages have dependencies on libzip-dev, so I assume it’s just that someone somewhere forgot to add the flag to the configure parameters?

Anyway, as always thanks for the packages! I just thought I would let you know about this 🙂

Thank you very much!!! Can’t wait to update my servers when the PECL packages are ready.

Why ‘apt-get install php7’ also installs ‘ apache2 apache2-bin apache2-data apache2-utils aspell aspell-en enchant hunspell-en-us libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
libaprutil1-ldap libaspell15 libenchant1c2a libhunspell-1.3-0 liblua5.1-0’ ?

@Sergey : because that’s one way to satisfy the dependencies. If you want to install another SAPI, please name it explicitly, for example :

apt-get install php7.0-cli

or

apt-get install php7.0-fpm

Hey @Guillaume Plessis, thanks for this update. But i have some trouble with the mcrypt library. Here is the error :

root@www:/etc/php/7.0/cli# php -v
PHP Warning: Module ‘mcrypt’ already loaded in Unknown on line 0
PHP 7.0.0-5~dotdeb+8.1 (cli) NTS
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

Hi Purwandi
I remember this problem also happened in PHP5 and what solved changing the line in the php.ini about the loading of the mcrypt lib. Just comment the line (it was the answer in PHP5, maybe it still the same in PHP7)
Hope it will help.

In fact, I had the same issue and seems like php was compiled with mcrypt embded (configure with ‘–with-mcrypt’ option).
For me the installation of php7.0-mcrypt is useless in this release.
Just desinstall it and be careful about next versions.

@Tom : mysqlnd n’est pas une extension à proprement parler, mais une interface entre MySQL et PHP, comme peut l’être la libmysqlclient de votre système.

Les extensions PHP relatives à MySQL (mysqli, PDO_mysql) sont toutes dans le paquet php7.0-mysql et sont compilées avec mysqlnd en lieu et place de libmysqlclient.

Merci pour le travail mené jusque ici et bon courage pour la suite.

J’ai une machine virtuelle qui tourne sous debian 8.2, c’est possible d’installer php7 et certaines de ses extensions avec un apt-get ?

same her and it fails to start, but it’s installed it seems

[13-Dec-2015 14:29:57] ERROR: unable to bind listening socket for address ‘/run/php/php7.0-fpm.sock’: No such file or directory (2)
[13-Dec-2015 14:29:57] ERROR: FPM initialization failed

had to manually make the folder

Ok je me réponds à moi même : il faut vraiment supprimer toute trace de PHP 5.
Quitte à faire un backup avant
sudo apt-get purge php5-*

Merci pour ce beau boulot !

Ah d’accord donc c’est parfait .

Merci pour votre réponse, et evidemment aussi pour le travail fourni!

Hi!

Good work, but your packages should have the provide header to emulate php5 packages.

On my monitoring maching APT says me it will remove cacti, nagios and ocsinventory-server If it installs your packages.

This it’s due because these other packages depends on php5 packages and your packages don’t say they replace php5.

Regards,

Same is true for PHPMyAdmin as well. I couldn’t install it via APT since it depends php5 and libapache2-mod-php5

Comments are closed.