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

Upgrade to 3.4.5, Phalcon does not "start"

I upgraded php7.0-phalcon, going to 3.4.5. I'm on Debian 9.

I now get Fatal error: Uncaught Error: Class 'Phalcon\Di\FactoryDefault' not found

My phalcon module correctly shows in phpinfo. I have no clue on what could cause this. Incompatibility between 3.4.5 and php 7.0?

Can you please give me some hint?

You forgot to include phalcon.so extension. Check if Phalcon is in PHP modules by typing in console - php -m.



630

You forgot to include phalcon.so extension. Check if Phalcon is in PHP modules by typing in console - php -m.

Thanks Anton for your reply.

My installation was running very fine. I only upgraded php7.0-phalcon to the latest version : 3.4.5-1+php7.0, and since then, it fails to instantiate phalcon.

The module is present and enabled:

[email protected]:~# php -m | grep phalcon phalcon

phalcon.so is present in the modules dir : [email protected]:~# ls -all /usr/lib/php/20151012 | grep phalcon -rw-r--r-- 1 root root 5073000 Oct 30 17:08 phalcon.so

Any other idea?

Can you also check not only in CLI env but also in WEB? By creating simple file with <?php phpinfo(); and running it on browser?



630

Can you also check not only in CLI env but also in WEB? By creating simple file with <?php phpinfo(); and running it on browser?

You're right, the "apache2" php doesn't know about the phalcon module. phpinfo doesn't show the module.

The phpinfo produced by the cli shows the module php -r "phpinfo();"

phalcon

Web framework delivered as a C-extension for PHP phalcon => enabled Author => Phalcon Team and contributors Version => 3.4.5 Build Date => Oct 30 2019 16:08:08 Powered by Zephir => Version 0.10.16-6826149172

It's not a version problem, it's a global (apache) phalcon install problem. I insist, I only did an apt upgrade.

I'll investigate further, if you have another hint for me, you're very welcome.



630

It's even not apache2, it's FPM



630
Accepted
answer

I'm very sorry, the conclusion is that the php7.0-fpm service should have been restarted: service php7.0-fpm restart

I suppose this command is missing from the package installer. (or not, I'm not an expert in apt packages)

Thanks for sharing useful post here.