0

I've seen this happen with a number of extensions now. So I need the php_pdo_pgsql extension, and its definitely loaded. Heres the lines in php.ini:

extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll

enter image description here

The .dll files are in the ext directory. But from the command line:

PS C:\wamp64\www\spider\chebi> php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
odbc
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]

Its not in there. Got the same problem with xdebug. Does anyone know whats happening here? Is it something to do with the environment variables?

Dominic Fagan
  • 151
  • 2
  • 11
  • Possible duplicate of [2 php.ini files](http://stackoverflow.com/questions/3871768/2-php-ini-files) – lxg Nov 21 '16 at 21:08

2 Answers2

2

Usually there are 2 different PHP configuration file(php.ini) files. One for the CLI (Command line client) and one for server(APACHE).

You should use -c to specify path to php.ini file you want to use.

You can check details using php --help on cmd

Bhavik Shah
  • 2,300
  • 1
  • 17
  • 32
  • I checked that out: `PS C:\wamp64\www\spider\chebi> php --ini Configuration File (php.ini) Path: C:\WINDOWS Loaded Configuration File: C:\wamp64\bin\php\php5.6.25\php.ini Scan for additional .ini files in: (none) Additional .ini files parsed: (none)` so its loading the correct php.ini file. At least I think it is. – Dominic Fagan Nov 21 '16 at 05:26
  • Whoops, I just found out that the php.ini file I had been editing through the WAMP menu, is actually the one in the Apache folder. So you were right, thats the issue. – Dominic Fagan Nov 21 '16 at 05:39
1

I found the solution or maybe the problem: I did not restart php-fpm. My system was Centos 8, Apache 2, Php-fpm with Fast CGI.

Once I restarted php-fpm with the following command:

 sudo service php-fpm restart

The extension, which is in my case, ionCube Loader started working and I could see it loaded both from the command line and over the server.

Kiran Maniya
  • 8,453
  • 9
  • 58
  • 81