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.so doesn't appear to be a valid Zend extension

Hey,

I am trying to install PhalconPHP, it compiles just fine but won't be loaded and running "php -m" prints the error message:

/usr/lib/php5/20121212/phalcon.so doesn't appear to be a valid Zend extension

System: Ubuntu 14.10 x64, PhalconPHP 1.2.6 (from Git Repo), PHP 5.5.12-2ubuntu4

phpize -v: PHP Api Version: 20121113, Zend Module Api No: 20121212, Zend Extension Api No: 220121212

I tried compiling from the /build directory aswell as from /build/64bits and /build/safe and I added a 30-phalcon.ini with extension=phalcon.so to /etc/php5/conf.d/

Thanks in advance for any help!



8.1k

PhalconPHP 1.2.6 is deprecated Actual version is 1.3.3. Try to use it.



3.3k
edited Oct '14

I would but I cannot since we haven't yet migrated our project to 1.3 and don't currently have the time to do so.



8.1k

I was checked installation Phalcon 1.2.6 on Ubuntu 14.04 64. All works. Check your installation logs



98.9k
Accepted
answer

It seems that Phalcon is being loaded with zend_extension=phalcon.so instead of extension=phalcon.so



3.3k

I am so dump. -.-

I first wrote zend_extension=phalcon.so into the ini file, copied it to cli and fpm config folder and then changed it in the fpm config file only.

Thanks very much. =)



76
edited Feb '15

Hello

I'm trying to install phalcon ...

I ran the following as root:

yum install php5-dev php5-mysql gcc yum install git-core git clone git://github.com/phalcon/cphalcon.git
cd cphalcon/build
./install

Everything worked just fine, no errors or warnings. I then went to my dev subdomain in plesk, I added extension=phalcon.so below mongo.so (these are the only 2 additional extensions I need).

I then restarted httpd (service httpd restart), everything fine.

However, the phalcon.so extension doesn't show up in my loaded modules.

Any clue?

php -m doesn't show any error/warning either and zend_extension=phalcon.so didn't do it either.


Edit: I nailed it. I forgot this step:

Centos/RedHat/Fedora: Add a file called phalcon.ini in /etc/php.d/ with this content:

extension=phalcon.so

I considered only changing php.ini would do it. Anyway, thx :)