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

Phalcon extension not loaded

Hello Guys.

I compile the phalcon without any errors, the phalcon.so file is generated and putet in my php extension default path correctly but extension not loaded, i checked php.ini path in phpinfo(), extension_dir and ... every thing is ok but phalcon not loaded, i'm wondering xdebug.so file are alongsidephalcon.so inside my php extension default path loaded and working fine.

i install phalcon on my local syatem and it's working fine but in my vps i have this issue, both are debian 7 and same php version.



98.9k

Are you using Apache or Nginx+FPM?



15.4k


98.9k
Accepted
answer

There must be a file /etc/php5/apache2/conf.d/, you can create a file call 30-phalcon.ini that contains extension=phalcon.so



15.4k
edited Mar '14

thanks, i try it.



98.9k

It's not 30-phalcon.so, it's 30-phalcon.ini

/etc/php5/apache2/conf.d/30-phalcon.ini with extension=phalcon.so



15.4k

ok, it's worked, i love you man, but what was problem ?



98.9k

Phalcon needs to be loaded after PDO, loading the extension this way it will load phalcon with the lowest priority



15.4k

okay, bu why in my local system i dont have same problem ?



98.9k

Probably PDO is bundled with PHP so it's always loaded before Phalcon



15.4k

Okay, thank you.

edited Mar '14

Hi there, im try to solve the same Problem. I have set the config file at /etc/php5/apache2/conf.d/30-phalcon.ini with extension=phalcon.so but it is not loading the phalcon extension...

are there other fix tips ?

Thanks

UPDATE: No error, i reinstall the extenstion again and its fixed. Thanks !!!!



15.4k

@bootsym: are you using MAC ?

This was my problem and solution as well. Did this change at some point in the 1.3.0 development process? I was using 1.3.0 for weeks, then when it was officially released, this problem reared it's head. If this is a necessary step of installing 1.3.0, it should be added to the docs.

Would like to +1 this.

Using Nginx on Ubuntu 14.04 I re-installed and Phalcon stopped working.

Installation worked fine and could see the file in the PHP extension directory.

I had added the line to the extensions section in php.ini.

The issue was that the PDO wasn't being loaded before Phalcon.

The fix was to add a 30-phalcon.ini file with the contents "extension=phalcon.so" to the /conf.d/ directory