cli - php的pgsql编译版本不一致,如何修正?
PHP中文网
PHP中文网 2017-04-10 15:18:30
0
1
370

在CLI模式运行PHP,给出警告:

PHP Warning: PHP Startup: pdo_pgsql: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20121212
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: pgsql: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20121212
These options need to match
in Unknown on line 0

看提示应该是说pgsql和php用的api版本不一致,可是google了好半天,没有好到办法如何重新编译pgsql。谁帮忙看看哈。

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
巴扎黑

你首先搞清楚,出问题的是 php-pgsql 模块,不是 pgsql 这个数据库。

你的模块使用的是旧版本的 PHP API,而 PHP 已经是新版本的 API 了。也就是说,你的 PHP 版本和 php-pgsql 模块的版本差异过大。

你是从哪里安装的 PHP 又是从哪里安装的 php-pgsql 啊?如果是 Linux 的话,推荐从软件源里安装相关包,这样版本一定是兼容的。

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!