Distribution upgrades/jessie stretch

From Wikitech

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.

Jessie to Stretch in-place upgrade has only been tested once in labs. Please do this at your own risk. This page mostly assumes you are migrating to a freshly installed instance.

Also see this useful version table on debian.org.

Apache

libapache2-mod-php

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

mysql-server-5.5

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

mysql-client-5.5

  • 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 stackoverflow thread and tutsplus tutorial.

PHP

php5

  • php5 has been replaced with php7.0 in stretch

php5-cli

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

example patch to fix

php5-mysql

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

example patch to fix

Python

instance upgrade reports

Phabricator

  • 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

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