0
votes

I have PHP Version 5.6.29 and i have to install phalcon 2.0.10 and also tried with phalcon 2.0.13 version on ubuntu14.04 system. But i am getting below error in apache error log

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/phalcon.so' - /usr/lib/php/20131226/phalcon.so: undefined symbol: php_pdo_g$

So please help me here.

3

3 Answers

1
votes

undefined symbol: php_pdo_g

Looks like you do not have pdo extension. Or refer to the: Why does Phalcon 2 raise "undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0" warning?

0
votes

As you have apache2 at ubuntu 14.04 I assume, that you have probably added

extension=phalcon.so

in wrong file. There are a couble of configuration files for PHP in ubuntu at path /etc/php5. Mine tree looks like this:

/etc/php5$ tree
.
├── apache2
│   ├── conf.d
│   │   ├── 05-opcache.ini -> ../../mods-available/opcache.ini
│   │   ├── 10-pdo.ini -> ../../mods-available/pdo.ini
│   │   ├── ...
│   │   └── 21-phalcon.ini -> /etc/php5/mods-available/phalcon.ini
│   └── php.ini
├── cli
│   ├── conf.d
│   │   ├── 05-opcache.ini -> ../../mods-available/opcache.ini
│   │   ├── 10-pdo.ini -> ../../mods-available/pdo.ini
│   │   ├── ...
│   │   └── 21-phalcon.ini -> /etc/php5/mods-available/phalcon.ini
│   └── php.ini
└── mods-available
    ├── ...
    └── phalcon.ini

As you can see, in mods-available folder there is a phalcon.ini file, which holds extension=phalcon.so line. Than in other folders there are symlinks to it. Don't forget about the number on the begining of symlink name. In documentation they write sometimes that it should be named 30-phalcon.ini etc. Case is that it should be loaded after all other extensions to satisfy Phalcons requirements, and the highest number at first part of filename is used for that, as extensions are loaded in ascending order based on filenames.

To fix your problem you should remove extension line from php.ini file and put it in dedicated file in mods-available/ directory, and after that link it with proper filename in all conf.d/ folders.

-2
votes

Tutorial how install phalcon: https://www.digitalocean.com/community/tutorials/how-to-install-and-get-started-with-phalcon-on-an-ubuntu-12-04-vps

You should php.ini edit and Apache restart:

sudo service apache2 restart