简体   繁体   中英

php_pgsql package extension is not loaded automatically from /etc/php.d/ directory

I have installed php_pgsql package using the command

yum install rh-php56-php-pgsql.x86_64

I am developing my project with

  • PHP 5.6.27
  • PostgreSQL 9.6.1
  • RedHat 7 OS

instalation was succesful..

Installed: rh-php56-php-pgsql.x86_64 0:5.6.5-9.el7

Dependency Installed: audit-libs-python.x86_64 0:2.6.5-3.el7
checkpolicy.x86_64 0:2.5-4.el7 libcgroup.x86_64 0:0.41-11.el7
libsemanage-python.x86_64 0:2.5-4.el7 policycoreutils-python.x86_64 0:2.5-8.el7 python-IPy.noarch 0:0.75-6.el7
rh-php56-php-common.x86_64 0:5.6.5-9.el7 rh-php56-php-pdo.x86_64 0:5.6.5-9.el7 rh-php56-php-pecl-jsonc.x86_64 0:1.3.6-3.el7 rh-php56-runtime.x86_64 0:2.0-6.el7 setools-libs.x86_64 0:3.3.8-1.1.el7

Complete!

I could find the pgsql.ini file in /etc/php.d/ directory. still the php.info page is not showing the pgsql details.

please check my error_log file

PHP Startup: Unable to load dynamic library '/opt/cpanel/ea-php56/root/usr/lib64/php/modules/pgsql.so' - /opt/cpanel/ea-php56/root/usr/lib64/php/modules/pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0

So my instalation was not added the pgsql.so file in the right place. I dont know how to sove this issue. please help, thanks in advance.

finally i solved the issue..

The package instalation was actually done to the DIR PATH

/usr/lib64/php/modules/pgsql.so

I ensured it with the command

rpm -ql php-pgsql

from the PHP config file i found the exact PHP Module path. by moving the pgsql.so file into the location made the module enabled for PHP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM