Do

php -i |grep php.ini

Compare the path with php.ini path shown in phpinfo page.

cli must be using different php.ini file