PHP: 8.1
CodeIgniter: 3.1.13
(I am continuing to use CodeIgniter 3 because the structure is very different from CI4.)
OS: Amazon Linux2023
When deploying with Nginx, I get the following error:
Type: Error
Message: Call to undefined function pg_connect()
Of course, I have installed the PostgreSQL extension and uncommented the extension settings as shown below:
/etc/php.d/20-pgsql.ini:extension=pgsql.so
/etc/php.d/30-pdo_pgsql.ini:extension=pdo_pgsql.so
/etc/php.ini:extension=pgsql.so
I don’t understand why I am getting the above error despite this.
Has anyone solved the same problem?
I manually reinstalled the extension modules and restarted php-fpm and Nginx.
I also changed extension=pgsql.so to extension=pgsql and restarted php-fpm and Nginx.
I checked to ensure that extension_dir = “ext” is set to the correct path, and it appears to be correct.
Despite doing these steps, the error is still not resolved. Is there anything else that could be considered?