I have this file directory:
When I open this project in browser: Fatal error: Class ‘PhalconMvcApplication’ not found in…
I read that I have to install composer but when I install composer this errors occure:
How can I run my project?
My composer.json file consists:
"require": {
"phalcon/incubator-mailer": "^1.0",
"smi2/phpclickhouse": "^1.4",
"hybridauth/hybridauth": "^3.8"
}
}```
2
Answers
There are in fact two problems.
You are missing the phalcon php extension. You can find the instructions on how to install the extension in the official Phalcon documentation.
You need at least php version 7.3 to satisfy the requirements of
smi2/phpclickhouse
. Since php 7.x is EOL since 26th of November 2022, I’d strongly suggest to upgrade to the latest version which currently is php 8.1.Once you resolved the two problems,
composer install
should run successfully, and the missing classes should be placed in thevendor
directory.Following up on some of the other comments, Phalcon 4 is NOT compatible with PHP 8.1. Phalcon 4 requires PHP 7.4.
If you plan on running PHP 8.1, you will need to install Phalcon 5.1.1.
You can find the Phalcon installation documentation on at https://phalcon.io