为什么Phalcon 2会在"0行的Unknown"中引发“未定义符号:php_pdo_get_dbh_ce"?警告? [英] Why does Phalcon 2 raise "undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0" warning?

查看:326
本文介绍了为什么Phalcon 2会在"0行的Unknown"中引发“未定义符号:php_pdo_get_dbh_ce"?警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我根据 https://docs安装Phalcon 2.0.13时. phalconphp.com/en/latest/reference/install.html 描述,我想启动我的测试脚本,然后出现以下错误(从字面上看这只是一个警告,但它导致无法加载Phalcon并导致错误):

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警告:PHP启动:无法加载动态库'/usr/lib/php/20131226/phalcon.so'-/usr/lib/php/20131226/phalcon.so:未定义符号:php_pdo_get_dbh_ce在第0行上为未知" }

{ 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?

推荐答案

经过很多努力,我设法解决了这个问题. {extension=phalcon.so}行不应放在php.ini中.相反,您应该创建一个包含{extension=phalcon.so}/etc/php/5.6/cli/conf.d/30-phalcon.ini文件.

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}.

原因是通过这种方式,您可以保证ini文件的处理顺序正确.

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

如果您不仅想在cli中使用phantom,还要在apache模块中使用phantom,那么也可以将ini文件复制到相应的目录中. (目录名称在您的系统中可以不同.)

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.)

这篇关于为什么Phalcon 2会在"0行的Unknown"中引发“未定义符号:php_pdo_get_dbh_ce"?警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆