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 justphp7-*. - 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
jsonandOpCachemodules are now packaged separately, respectively namephp7.0-jsonandphp7.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… :)
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 :)
Any chance to have it on wheezy ? <3
Thanks a lot for all your great work.
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-1dotdeb+8.1_amd64.deb … Dépaquetage de php7.0-json (7.0.0-1dotdeb+8.1) … Paramétrage de php7.0-fpm (7.0.0-1dotdeb+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 !
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
Hi.
When will php7.0-mcrypt, geoip, xmlrpc, imagick memcached available? Later this month, or you cannot predict?
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.
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?
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 :)
@Sergey : because that’s one way to satisfy the dependencies. If you want to install another SAPI, please name it explicitly, for example :
or
Bonjour,
Merci pour tout ce travail Guillaume!
J’ai écrit un guide de migration PHP5 vers PHP7, si cela peut aider.
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
Merci pour tout le travail fourni, c’est juste génial!
php7.0-mysqlnd est-il dans vos plans?
@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.
Ah d’accord donc c’est parfait .
Merci pour votre réponse, et evidemment aussi pour le travail fourni!
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 ?
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 !
Nice work ! (The new naming convension is awesome)
Looking forward to the imagick and redis extensions !
Thanks a lot for this !
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,
We have a running PHP7 container in PHP Docker Boilerplate if anyone want’s to test it :)
The plain Docker container is also available at Docker hub: https://hub.docker.com/u/webdevops/