Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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



1.7k
Accepted
answer
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
extension=psr.so

3) Enable the psr mod:

phpenmod psr

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

service apache2 restart
service php7.4-fpm restart