Bug 231486 - www/mod_php56 should be upgraded to www/mod_php71 after "pkg upgrade -a"
Summary: www/mod_php56 should be upgraded to www/mod_php71 after "pkg upgrade -a"
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-19 19:50 UTC by Marcin Cieślak
Modified: 2018-09-24 10:00 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Cieślak 2018-09-19 19:50:38 UTC
On a 11.1-RELEASE-p4 box running apache 2.4 + mod_php + wordpress setup "pkg upgrade -a" caused a breakage because all lang/php56* packages got upgraded to php71 but mod_php56 was left installed.

Therefore mod_php56 could not load extensions needed to run.

Installing mod_php71 by hand solved the issue but this should be done during the upgrade
Comment 1 Torsten Zuehlsdorff freebsd_committer 2018-09-20 18:45:30 UTC
Aloha Marcin,

this works like intended. The default PHP version switched from PHP 5.6 to 7.1.

Please consult:
$ pkg updating php56

This will display an guide to update. Please always use pkg updating before pkg upgrade to make sure you do not miss any important upgrade notices!

Greetings,
Torsten
Comment 2 Marcin Cieślak 2018-09-22 21:00:31 UTC
Hi Torsten

I read the UPDATING notice that informed me about php default version switch and this is fine.

The problem is (as I see it) that wordpress says it needs both some PHP modules and the webserver module:

USES=           php:web cpe
USE_PHP=        curl gd hash mysqli pcre tokenizer xml zip zlib ftp

and we let "curl gd hash ..." modules to update, but the former stays as it was.

If I read properly, the dependency is based on the current PHP_VER:

RUN_DEPENDS+=   ${PHPBASE}/${APACHEMODDIR}/libphp${PHP_VER:C/.$//}.so:${MOD_PHP_PORT}

so for ports it wouldn't be a problem.

Maybe it is the problem with pkg not understanding the above?

It's definitely a POLA violation (my opinion only), and UPDATING entry does not mention this issue specifically.
Comment 3 commit-hook freebsd_committer 2018-09-24 09:59:47 UTC
A commit references this bug:

Author: tz
Date: Mon Sep 24 09:59:42 UTC 2018
New revision: 480564
URL: https://svnweb.freebsd.org/changeset/ports/480564

Log:
  Improve UPDATING notice for switch of PHP default version to PHP 7.1.

  The port mod_php56 was not handled by the upgrade instruction.

  PR:		231486

Changes:
  head/UPDATING
Comment 4 Torsten Zuehlsdorff freebsd_committer 2018-09-24 10:00:55 UTC
You are right. I was under the impression that mod_php was handled by the instruction, but it is not.

Thank you for pointing me to this mistake. I added a paragraph for mod_php to the updating instruction! :)