简体   繁体   中英

Phalcon.ini is loaded in phpifo but phalcon is not installed

I am trying to install the Phalcon4 with php7.4-fpm and I see that the ini file for phalcon is loaded in my phpinfo() here

在此处输入图片说明

But I am still getting the below error

Problem 1
    - phalcon/incubator-logger[v1.0.0-beta.1, ..., v1.0.1] require ext-phalcon ^4.0 -> it is missing from your system. Install or enable PHP's phalcon extension.
    - Root composer.json requires phalcon/incubator-logger ^1.0 -> satisfiable by phalcon/incubator-logger[v1.0.0-beta.1, v1.0.0, v1.0.1].

To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.4/cli/php.ini
    - /etc/php/7.4/cli/conf.d/10-mysqlnd.ini
    - /etc/php/7.4/cli/conf.d/10-opcache.ini
    - /etc/php/7.4/cli/conf.d/10-pdo.ini
    - /etc/php/7.4/cli/conf.d/15-xml.ini
    - /etc/php/7.4/cli/conf.d/20-calendar.ini
    - /etc/php/7.4/cli/conf.d/20-ctype.ini
    - /etc/php/7.4/cli/conf.d/20-curl.ini
    - /etc/php/7.4/cli/conf.d/20-dom.ini
    - /etc/php/7.4/cli/conf.d/20-exif.ini
    - /etc/php/7.4/cli/conf.d/20-ffi.ini
    - /etc/php/7.4/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.4/cli/conf.d/20-ftp.ini
    - /etc/php/7.4/cli/conf.d/20-gd.ini
    - /etc/php/7.4/cli/conf.d/20-gettext.ini
    - /etc/php/7.4/cli/conf.d/20-iconv.ini
    - /etc/php/7.4/cli/conf.d/20-json.ini
    - /etc/php/7.4/cli/conf.d/20-mbstring.ini
    - /etc/php/7.4/cli/conf.d/20-mysqli.ini
    - /etc/php/7.4/cli/conf.d/20-pdo_mysql.ini
    - /etc/php/7.4/cli/conf.d/20-phar.ini
    - /etc/php/7.4/cli/conf.d/20-posix.ini
    - /etc/php/7.4/cli/conf.d/20-readline.ini
    - /etc/php/7.4/cli/conf.d/20-shmop.ini
    - /etc/php/7.4/cli/conf.d/20-simplexml.ini
    - /etc/php/7.4/cli/conf.d/20-sockets.ini
    - /etc/php/7.4/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.4/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.4/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.4/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.4/cli/conf.d/20-xmlreader.ini
    - /etc/php/7.4/cli/conf.d/20-xmlrpc.ini
    - /etc/php/7.4/cli/conf.d/20-xmlwriter.ini
    - /etc/php/7.4/cli/conf.d/20-xsl.ini
    - /etc/php/7.4/cli/conf.d/50-phalcon.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

How can I get the Phalcon4 working for me? I am running LEMP Stack on Ubuntu 20.04

TIA

The error's indicate that you are trying to load phalcon via the CLI, your phpinfo() output is only showing that phalcon is loaded for FPM.

You need to load the extension in both config ini files:

Documentation :

; Ubuntu/Debian with Php7-fpm: Add a File Called 30-phalcon.ini in /etc/php7/fpm/conf.d/ with This Content:
extension=phalcon.so

; Ubuntu/Debian with Php7-cli: Add a File Called 30-phalcon.ini in /etc/php7/cli/conf.d/ with This Content:
extension=phalcon.so

We need to run phalcon PSR module Execute this command start the php-fpm server

sudo apt install php7.4-psr
sudo start php7.4-fpm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM