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

Class 'Phalcon\Di\FactoryDefault' not found

After installing phalcon done, I create a first phalcon project. So I have an error Fatal error: Class 'Phalcon\Di\FactoryDefault' not found in /opt/lampp/htdocs/store/public/index.php on line 16 when try running my first project :3 I have read https://forum.phalcon.io/discussion/1463/php-fatal-error-class-phalcon-di-factorydefault-cli-not-found but not work for me! Please help me!

Add extension=phalcon.so to your proper php.ini file.

Run command php -m. The list should contains phalcon module.



5.1k
edited Apr '17

I added it to php.ini and still error :3



5.1k
edited Apr '17

yes, list have phalcon module, but still error :3

Can you provide code?

edited Apr '17

You most likely have seperated php.ini for php-fpm/apache, you need to add link to phalcon.ini or extension=phalcon.so there too. And restart php-fpm/apache.