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?



82.2k

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



1.4k

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.



82.2k

Are any messages in the logs?



1.4k

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



1.4k

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



82.2k

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



1.4k

Nope. What can I do now to correct it?



82.2k

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



17.5k

Did you did this?

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

Add 'phalcon=extension.so' to the file


7.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


1.4k

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

Do the following:

```bash $ 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...

```bash $ sudo cp /pathwhererealfileis/phalcon.so /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/phalcon.so ``` or determine full path to extension :

```bash extension = /fullpathtophalconextension_file/phalcon.so ``` P.S. If you are using linux (Ubuntu etc.) will be better install normal LAMP stack.For example

```bash $ sudo tasksel install lamp-server ```