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

Problems when installing Phalcon on Ubuntu 12.04 LTS apache

Hey guys,

Im trying to install Phalcon on my Dreamhost VPS but after successive attempts I'm still having the same problem: Phalcon doesn't show up on phpinfo()...

I'll show you what I did until now:

1)

Ubuntu

sudo apt-get install php5-dev libpcre3-dev gcc make php5-mysql

2)

git clone --depth=1 git://github.com/phalcon/cphalcon.git cd cphalcon/build sudo ./install

-- no problems when compiling --

3)

Ubuntu/Debian: Add a file called 30-phalcon.ini in /etc/php5/conf.d/ with this content: extension=phalcon.so

Then I restarted my server and I got nothing about phalcon on phpinfo. I just got this on phpinfo():

Additional .ini files parsed: /etc/php55/conf.d/30-phalcon.ini

So what I did:

4)

Copied phalcon.so to my extension_dir on : "/usr/local/php55/lib/php/extensions/no-debug-non-zts-20121212"

5)

Added:

"extension=phalcon.so"

to

"/etc/php55/php.ini".

6) Restarted server and... nothing

Thank you

you could try using the full path in the 30-phalcon.ini, just to see if that works.

edited Aug '15

So I changed on /etc/php55/conf.d/30-phalcon.ini:

"extension=phalcon.so"

to

"extension="/usr/local/php55/lib/php/extensions/no-debug-non-zts-20121212"

and still not working.

Also someone could explain why we need 30-phalcon.ini? Thank you

you could try using the full path in the 30-phalcon.ini, just to see if that works.

It looks like the extension was compiled for a different version of PHP, try to find if you have more than one phpize script in your system

edited Aug '15

Andres,

on my terminal I wrote:

phpize --version

and I got

PHP API Version: 20090626

On my phpinfo() my PHP API is 20121113, so my phalcon.so may be compiled for 20090626, right?

It looks like the extension was compiled for a different version of PHP, try to find if you have more than one phpize script in your system

Yes, try renaming the phpize and php-config and see if it takes the correct binaries.



2.5k
Accepted
answer

Firstly, thank you Andres and Gareth.

So what happen is that my phpize was in a different version of my Apache PHP, so I just did that:

sudo add-apt-repository ppa:ondrej/php5 (php 5.5 repository) sudo apt-get update sudo apt-get upgrade sudo apt-get install php5

git clone --depth=1 git://github.com/phalcon/cphalcon.git cd cphalcon/build sudo ./install cd cphalcon/build sudo .install

Then phalcon.so was compiled on /usr/lib/php5/20121212 but my php extension dir is /usr/local/php55/lib/php/extensions/no-debug-non-zts-20121212. so:

sudo cp /usr/lib/php5/20121212/phalcon.so /usr/local/php55/lib/php/extensions/no-debug-non-zts-20121212

After that I restarted my Apache and Phalcon was installed.

Thank you guys again