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

Help with installing php-psr for php 7.4 (ubuntu 18.04)

Hi guys, I've been unable to install the phalcon extension into php 7.4. I keep getting the warning PHP Warning: Cannot load module 'phalcon' because required module 'psr' is not loaded in Unknown on line 0. But when trying to install php-psr, I was unable to specify where the extension should be downloaded in.

The commands seem a bit weird inside the readme: https://github.com/jbboehr/php-psr

git clone https://github.com/jbboehr/php-psr.git cd php-psr /usr/local/bin/phpize ./configure --with-php-config=/usr/local/bin/php-config make make test sudo make install

edited Feb '20

Here is what I just did to get it unstalled...

1) Installed PHP 7.4.

2) Run pecl to install psr:

pecl install psr

3) Created /etc/php/7.4/mods-available/psr.ini with the following lines:

; configuration for psr module
; priority=20

3) Enable the psr mod:

phpenmod psr

4) Restarted Apache (and in my case, fpm):

service apache2 restart
service php7.4-fpm restart