We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Update package php7.2-phalcon - Crash php7.2-fpm

Hi! Today updated Ubuntu 18.04

sudo apt update sudo apt upgrade

The following packages will be upgraded: php7.2-phalcon

Get:1 https://packagecloud.io/phalcon/stable/ubuntu bionic/main amd64 php7.2-phalcon amd64 4.0.0-alpha1-1+php7.2 [1,283 kB] Fetched 1,283 kB in 1s (1,424 kB/s)
(Reading database ... 303458 files and directories currently installed.) Preparing to unpack .../php7.2-phalcon_4.0.0-alpha1-1+php7.2_amd64.deb ... Unpacking php7.2-phalcon (4.0.0-alpha1-1+php7.2) over (3.4.2-2+php7.2) ... Setting up php7.2-phalcon (4.0.0-alpha1-1+php7.2) ...

after updating falcon php7.2-fpm now does not start, gives a fatal error

NOTICE: PHP message: PHP Fatal error: Class 'psr\container\containerinterface' not found in Unknown on line 0

Are there any solutions?

UPD: I downloaded the old version 3.4 and updated, everything is ok. But what to do with 4.0.0?

wget --content-disposition https://packagecloud.io/phalcon/stable/packages/debian/stretch/php7.2-phalcon_3.4.2-2+php7.2_amd64.deb/download.deb



411
Accepted
answer

have you read this line? --- "Now Phalcon requires the PSR PHP extension to be installed and enabled"

thank. I haven’t read the blog post yet, so I didn’t know

have you read this line? --- "Now Phalcon requires the PSR PHP extension to be installed and enabled"

edited Dec '18

Phalcon stable repo published 4.0.0-alpha version (yes in stable repository alpha version).

another solution: downgrade to stable 3.x and lock

apt install php7.2-phalcon=3.4.2-2+php7.2
apt-mark hold php7.2-phalcon=3.4.2-2+php7.2
edited Dec '18

[email protected]:/etc/php/7.2/mods-available$ sudo apt install php-psr Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'php-psr-simple-cache-implementation' for glob 'php-psr' Note, selecting 'php-psr-http-message' for glob 'php-psr' Note, selecting 'php-psr-link' for glob 'php-psr' Note, selecting 'php-psr-log-implementation' for glob 'php-psr' Note, selecting 'php-psr-log' for glob 'php-psr' Note, selecting 'php-psr-container-implementation' for glob 'php-psr' Note, selecting 'php-psr-container' for glob 'php-psr' Note, selecting 'php-psr-cache' for glob 'php-psr' Note, selecting 'php-psr-simple-cache' for glob 'php-psr' Note, selecting 'php-psr-cache-implementation' for glob 'php-psr*' php-psr-container is already the newest version (1.0.0-1). The following NEW packages will be installed: php-psr-cache php-psr-http-message php-psr-link php-psr-log php-psr-simple-cache 0 upgraded, 5 newly installed, 0 to remove and 1 not upgraded. Need to get 32.2 kB of archives. After this operation, 175 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 https://archive.ubuntu.com/ubuntu bionic/universe amd64 php-psr-cache all 1.0.1-1 [5044 B] Get:2 https://archive.ubuntu.com/ubuntu bionic/universe amd64 php-psr-http-message all 1.0.1-1 [12.3 kB] Get:3 https://archive.ubuntu.com/ubuntu bionic/universe amd64 php-psr-link all 1.0.0-1 [3940 B] Get:4 https://archive.ubuntu.com/ubuntu bionic/universe amd64 php-psr-log all 1.0.2-1 [6976 B] Get:5 https://archive.ubuntu.com/ubuntu bionic/universe amd64 php-psr-simple-cache all 1.0.0-1 [3980 B] Fetched 32.2 kB in 0s (128 kB/s) Selecting previously unselected package php-psr-cache. (Reading database ... 33865 files and directories currently installed.) Preparing to unpack .../php-psr-cache_1.0.1-1_all.deb ... Unpacking php-psr-cache (1.0.1-1) ... Selecting previously unselected package php-psr-http-message. Preparing to unpack .../php-psr-http-message_1.0.1-1_all.deb ... Unpacking php-psr-http-message (1.0.1-1) ... Selecting previously unselected package php-psr-link. Preparing to unpack .../php-psr-link_1.0.0-1_all.deb ... Unpacking php-psr-link (1.0.0-1) ... Selecting previously unselected package php-psr-log. Preparing to unpack .../php-psr-log_1.0.2-1_all.deb ... Unpacking php-psr-log (1.0.2-1) ... Selecting previously unselected package php-psr-simple-cache. Preparing to unpack .../php-psr-simple-cache_1.0.0-1_all.deb ... Unpacking php-psr-simple-cache (1.0.0-1) ... Setting up php-psr-log (1.0.2-1) ... Setting up php-psr-simple-cache (1.0.0-1) ... Setting up php-psr-link (1.0.0-1) ... Setting up php-psr-cache (1.0.1-1) ... Setting up php-psr-http-message (1.0.1-1) ...```

But subsequently there is no psr extension to include as per instructions ( echo extension=psr.so | tee -a /path/to/your/php.ini)

[email protected]:/etc/php/7.2/mods-available$ ls -la p* -rw-r--r-- 1 root root 69 Sep 13 14:45 pdo.ini -rw-r--r-- 1 root root 75 Sep 13 14:45 pdo_dblib.ini -rw-r--r-- 1 root root 81 Sep 13 14:45 pdo_firebird.ini -rw-r--r-- 1 root root 74 Sep 13 14:45 pdo_mysql.ini -rw-r--r-- 1 root root 72 Sep 13 14:45 pdo_odbc.ini -rw-r--r-- 1 root root 74 Sep 13 14:45 pdo_pgsql.ini -rw-r--r-- 1 root root 77 Sep 13 14:45 pdo_sqlite.ini -rw-r--r-- 1 root root 70 Sep 13 14:45 pgsql.ini -rw-r--r-- 1 root root 1225 Dec 25 22:30 phalcon.ini -rw-r--r-- 1 root root 70 Sep 13 14:45 phar.ini -rw-r--r-- 1 root root 71 Sep 13 14:45 posix.ini

[email protected]:/etc/php/7.2/mods-available$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic

Phalcon currently broken for me as Apache won't start due to:

[email protected]:/etc/apache2/sites-available$ tail /var/log/apache2/error.log PHP Fatal error: Class 'psr\container\containerinterface' not found in Unknown on line 0

Currently using @panaceya's tip to downgrade phalcon.

I had this same error also even after installing the psr.so. I hadn't noticed that the psr.so extension needs to be loaded before phalcon.so. After I changed that, Apache would start normally.