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

Installation on NGINX + PHP5.4

Hi,

I managed to compile phalcon on my machine (NGINX + PHP5.4 - FPM), and I added the extension to /etc/php5/fpm/conf.d/30-phalcon.ini

But after I restart php and I run "php5 -i | grep phalcon" it says

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/phalcon.so' - /usr/lib/php5/20100525/phalcon.so: cannot open shared object file: No such file or directory in Unknown on line 0

Went to /usr/lib/php5 and discovered that phalcon.so is installed in another folder named 20090626. I created a symlink to the folder where php5 is looking for and now it says

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/phalcon.so' - /usr/lib/php5/20100525/phalcon.so: undefined symbol: output_globals in Unknown on line 0

Any ideea?

You have to compile phalcon against the PHP version you are using. In your case php5/20100525, but it was compiled for php5/20090626. Make sure $ phpize -v points to the correct version.



1.6k

Any ideea how can I change that? I have both /usr/bin/phpize and /usr/bin/phpize5 and both show on -v

Configuring for: PHP Api Version: 20090626

Zend Module Api No: 20090626

Zend Extension Api No: 220090626

When I run which phpize/phpize5 I get /usr/bin/phpize and /usr/bin/phpize5.

When I run php5 -i | grep Extension

PHP Extension => 20100525



1.6k

I tried to locate the right phpize by using locate phpize

/etc/alternatives/phpize

/etc/alternatives/phpize.1.gz

/usr/bin/phpize

/usr/bin/phpize5

/usr/lib/php5/build/phpize.m4

/usr/share/man/man1/phpize.1.gz

/usr/share/man/man1/phpize5.1.gz

/var/lib/dpkg/alternatives/phpize

But when I run /path/to/phpize -v for each of them I always get: (only the first, the 3rd and the 4th are valid phpize files)

Configuring for:

PHP Api Version: 20090626

Zend Module Api No: 20090626

Zend Extension Api No: 220090626

I simply can't find the right phpize file...

edited May '14

Which OS and which PHP have you installed?



1.6k

I have ubuntu 12.04 LTS and PHP5.4, which I have upgraded a few months ago from php5.3. I guess the upgrade is the problem but I can't find any other phpize.



1.6k

I come back to this thread as I couldn't solve the problem.

It's strange that from CLI if I run php5 -v I get PHP 5.4.17-1~precise+1 (cli), but if I run php-config5 --version I get 5.3.10-1ubuntu3.11.

I upgraded php from 5.3 to 5.4 using ondrej-php5 ppa a few months ago.



1.6k

Finally the solution was to upgrade php5-dev package. This got me to php5.5.12 version but that was fine with me. Solution offered on ubuntu forums https://askubuntu.com/questions/480865/ubuntu-12-04-php-config5-points-to-5-3-instead-5-4/480983#480983