Skip to content

Problems with PHP module version #284

Closed
@actopolus

Description

@actopolus

OS: Debian GNU/Linux 8.11 (jessie) (Same on Ubuntu 18.04.2 LTS)
Unit version: 1.9.0 (from github repo)

Problem:
Php version doesn't change when configurator responses "Reconfiguration done.". Php version always targets on newer version. When "type" for application php "7.1.30", phpinfo shows 7.2.20.

Env
It has two modules for php 7.1 and php 7.2, and simple script with phpinfo():

Unit build configuration:

unit version: 1.9.0
configured as ./configure --debug --prefix=/usr --state=/var/lib/unit --control=unix:/var/run/control.unit.sock --pid=/var/run/unit.pid --log=/var/log/unit.log --tests --openssl --modules=/usr/lib/unit/modules

Unit log:

module: php 7.1.30-2+0\~20190710.21+debian8\~1.gbp011d3c "/usr/lib/unit/modules/php71.unit.so"
module: php 7.2.20-1+0\~20190710.23+debian8\~1.gbp2428c5 "/usr/lib/unit/modules/php72.unit.so"

Unit config:

{
	"listeners": {
		"*:8300": {
			"application": "exa"
		}
	},

	"applications": {
		"exa": {
			"type": "php 7.1.30",
			"processes": 2,
			"user": "www-data",
			"group": "www-data",
			"root": "/var/www/example",
			"script": "index.php",
			"environment": {
				"APPLICATION_TYPE": "applications",
				"APPLICATION_ENV": "Testing"
			}
		}
	}
}

Steps to reproduce:

  • Checkout repos
  • Configure unit 1.9.0 (sudo ./configure --debug --prefix=/usr --state=/var/lib/unit --control=unix:/var/run/control.unit.sock --pid=/var/run/unit.pid --log=/var/log/unit.log --tests --openssl --modules=/usr/lib/unit/modules)
  • Build unit (make)
  • Install unit (make install)
  • Install php7.1-dev, libphp7.1-embed
  • Configure module php7.1 (sudo ./configure php --module=php71 --config=/usr/bin/php-config7.1 --lib-path=/usr/lib/php/7.1/sapi)
  • Build php71 (make php71)
  • Install php71 (make php71-install)
  • Configure simple app with phpinfo and type "php 7.1.30"
  • See phpinfo (shows version 7.1.30)
  • Install php7.2-dev, libphp7.2-embed
  • Configure module php7.2 (sudo ./configure php --module=php72 --config=/usr/bin/php-config7.2 --lib-path=/usr/lib/php/7.2/sapi)
  • Build php72 (make php72)
  • Install php72 (make php72-install)
  • Restart unit for module discovery
  • See phpinfo (shows version 7.2, when type is "php 7.1.30")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions