You are browsing a read-only backup copy of Wikitech. The live site can be found at

Distribution upgrades/jessie stretch

From Wikitech-static
< Distribution upgrades
Revision as of 22:45, 18 May 2017 by imported>Dzahn (→‎MySQL)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is a page to summarize all the things to look for when upgrading an instance/server from jessie to stretch.

Feel free to add sections by service/package name or your own more details report on a subpage.

Also see this useful version table on



On stretch libapache2-mod-php7.0 may have to be installed explicitly, while libapache2-mod-php5 was pulled in as a dependency automatically in the past.

example patch to fix



  • mysql-server-5.5 have been replaced with mariadb-server in stretch.


  • mysql-client-5.5 have been replaced with mariadb-client in stretch.

mysql_ functions in PHP

The MySQL extension of PHP is deprecated and does not exist in PHP7 anymore. This means if you have any mysql_connect(), mysql_query() or any other function starting with "mysql_" in your PHP code, it will stop working on stretch. You have to switch to either PDO or mysqli. Also see here and here.



  • php5 has been replaced with php7.0 in stretch


php5-cli does not exist anymore and is replaced by php7.0-cli.

example patch to fix


php5-mysql does not exist anymore and is replaced by php7.0-mysql.

example patch to fix


instance upgrade reports


  • Phabricator daemons will fail to launch and phabricator will fail to work unless php 7.1 is installed.
  • php7.0 is not supported in phabricator. Only 5.6 or lower and 7.1+.


Wikistats uses a typical LAMP-stack. Apache with PHP and MySQL so it can serve as an example for that.

Things that had to be done:

  • php5-mysql had to be replaced with php7.0-mysql [1]
  • php5-cli had to be replaced with php7.0-cli [2]
  • libapache2-mod-php7.0 had to be installed (while libapache2-mod-php5 was automatically pulled in as dependency before) [3]
  • I had to remove all mysql_ functions from PHP code and replace it with PDO. The deprecated MySQL extension does not exist anymore in PHP7. [4]

(note: I did not have to do anything about MySQL packages because i am already using MariaDB in this project. If you use MySQL you also need to switch and see above)

External links