automatix automatix - 9 months ago 117
PHP Question

Installing Phalcon PHP Devtools: "ERROR: Phalcon extension isn't installed ..." though the module is installed

After some days ago I installed

Phalcon PHP
, I am more and more exited about it. Now I want to try the
Phalcon Devtools
out. I've just installed it like in the
installation manual via Composer
(for Linux) shown. But when I try to execute the
command, I get an error:

$ phalcon commands
ERROR: Phalcon extension isn't installed, follow these instructions to install it:

What can be the problem?

Debian GNU/Linux 7.4 (wheezy)
PHP 5.5.11-1

Additional information:

I installed Phalcon PHP like in the docu shown:

$ apt-get install php5-dev libpcre3-dev gcc make php5-mysql
$ git clone --depth=1 git://
$ cd cphalcon/build
$ ./install

Since it seemed to not work, I tried it with

$ cd cphalon/build/64bits
$ export CFLAGS="-O2 --fvisibility=hidden"
$ ./configure --enable-phalcon
$ make && make install

After that the module was compiled and the
created in the PHP modules direcroty
. Then I created the
(with content
) manually and enabled it with a symlink:
ln -s /etc/php5/mods-available/phalcon.ini /etc/php5/fpm/conf.d/20-phalcon.ini
. And after a restart it worked. I created a "Hello World!" application and the module was also displayed in the

enter image description here

But the output of
php --modules
does not contain "phalcon". And the output of
does not contain it as well. Why?

Answer Source

The answer to both questions (1. Why do I get an error? and 2. Why php --modules doesn't show the module, though phpinfo() (in browser) does?) is the same: I enabled the module for FPM, but didn't do this for the CLI.

$ ln -s /etc/php5/mods-available/phalcon.ini /etc/php5/cli/conf.d/20-phalcon.ini

Now it works!