Why does Phalcon 2 raise “undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0” warning?

 ̄綄美尐妖づ 提交于 2019-12-24 16:33:22

问题


When I installed Phalcon 2.0.13 according to the https://docs.phalconphp.com/en/latest/reference/install.html description and I wanted to launch my test script then I got the following error (literally it is just a warning but it causes Phalcon not to be loaded which causes errors):

{ 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_get_dbh_ce in Unknown on line 0 }

What is this symptom cased by and how could I get rid of it?


回答1:


After struggling a lot, I managed to solve the problem. The {extension=phalcon.so} line should be put NOT in php.ini. Much rather, you should create a /etc/php/5.6/cli/conf.d/30-phalcon.ini file containing {extension=phalcon.so}.

The reason is that this way you can guarantee that the processing order of the ini files is appropriate.

If you want to use Phantom not just in cli but in apache module as well then copy the ini file in the corresponding directory too. (The directory names can be different in your system.)



来源:https://stackoverflow.com/questions/38292160/why-does-phalcon-2-raise-undefined-symbol-php-pdo-get-dbh-ce-in-unknown-on-lin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!