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 loading on Ubuntu 14.04 64-bit

I followed all installation steps given in the official guide, but I still can't get the phalcon extension to load. From what I read, it seems like the problem is the PDO module getting loaded after the phalcon module, but I'm using an XAMPP server and am not sure where the configuration directory is. Can somebody guide me as to what needs to be done?



98.9k

Check in the phpinfo() output what configuration file is loaded



2.1k

Hey, thanks for the super-quick response! The file loaded is /opt/lampp/etc/php.ini and it has extension=phalcon.so already in it and I've restarted the webserver many times by now.



98.9k

Are any messages in the logs?



2.1k

Found this in the PHP error log file:

[02-Oct-2014 17:34:20 Europe/Berlin] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/phalcon.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/phalcon.so: cannot open shared object file: No such file or directory in Unknown on line 0



2.1k

By the way, could it be a problem with the PHP version? Mine is 5.5.9.



98.9k

I think the extension was build with a wrong version of PHP, did you uninstall the PHP version bundled with Ubuntu?



2.1k

Nope. What can I do now to correct it?



98.9k

Can you uninstall the PHP bundled with PHP and compile Phalcon again?



33.8k

Did you did this?

sudo nano /etc/php5/apache2/conf.d/30-phalcon.ini

Add 'phalcon=extension.so' to the file


8.1k
edited Oct '14

Do the following:

$ sudo find / -name 'phalcon.so'

if you get different then

/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/phalcon.so

copy this file to /opt...

$ sudo cp /path_where_real_file_is/phalcon.so /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/phalcon.so

or determine full path to extension :

extension = /full_path_to_phalcon_extension_file/phalcon.so

P.S. If you are using linux (Ubuntu etc.) will be better install normal LAMP stack.For example

$ sudo tasksel install lamp-server


2.1k

Sorry, but that didn't help. I'll try removing XAMPP and installing LAMP and post the results here.

Do the following:

$ sudo find / -name 'phalcon.so'

if you get different then

/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/phalcon.so

copy this file to /opt...

$ sudo cp /path_where_real_file_is/phalcon.so /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/phalcon.so

or determine full path to extension :

extension = /full_path_to_phalcon_extension_file/phalcon.so

P.S. If you are using linux (Ubuntu etc.) will be better install normal LAMP stack.For example

$ sudo tasksel install lamp-server