0

I'm building out a web server on Rocky Linux 9 with Apache and PHP 8.3. I need the pdo_dblib extension. From the command line via "php -m" and "php-fpm -m", I see that the pdo_dblib extension exists in both. However, when I dump phpinfo() in a browser, the pdo_dblib extension is not loaded.

Phpinfo shows that it's running PHP-FPM. I've noted the loaded configuration file at /etc/opt/remi/php83/php.ini, and the extensions directory at /etc/opt/remi/php83/php.d.

Here were my troubleshooting steps:

  1. Checked the /etc/opt/remi/php83/php.d for the pdo_dblib extension. It wasn't there, so I added it.
  2. Ran sudo systemctl restart php-fpm
  3. Ran sudo systemctl restart httpd
  4. Refreshed the web page with phpinfo(). Still not loaded.

Any ideas on why this is happening, and how to fix it?

1 Answer 1

1

Looks like you are confused with the various PHP stacks available

  • php-* (default versions)
  • php83-php-* (SCL, design for parallel installation)

Check the repository FAQ

For proper repository configuration and usage, following the Wizard instructions is recommended.

If you want a single version, I recommend to remove all php83 package and update the default version to 8.3.

dnf module switch-to php:remi-8.3/common
dnf install php-pdo_dblib

If you need multiple versions, and then using php83-* packages, you have to install the proper package (as explained by the wizard)

dnf install php83-php-pdo_dblib

And to check if it is there

php83 --modules
1
  • You're right. I figured this out last night. Somehow, when trying to install PHP 8.3 and the extensions I need on Rocky Linux 9, I managed to install both PHP/PHP-FPM and PHP83/PHP-FPM. This ended up created 2 PHP-FPM Unix sockets. I was making all of my changes to the PHP version, and Apache's config was set up to use the PHP83 version. I changed the Apache config to use the correct socket, removed PHP83, and now all is well.
    – scott80109
    Apr 3 at 17:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .