as the topic says, phpMyAdmin isn't finding or reading the config.inc.php file. I found quite a few posts regarding something similar, but they all seem to deal with permissions and this doesn't seem to be the case. To test whether or not phpMyAdmin was reading the file, I purposefully added an error to it, but phpMyAdmin still works (I just have to manually enter a user/pass, which I'm trying to setup in the config). There are no errors in the httpd log or the php-fpm log. I've tried with the config.inc.php file in the following directories:
- /etc/phpMyAdmin
- /usr/share/phpMyAdmin
- /var/lib/phpMyAdmin/
- /var/lib/phpMyAdmin/config
- my local include path directory
I've installed phpMyAdmin numerous times before and never ran into this, as it usually reads from /etc/phpMyAdmin. On all the directories above, I've given it rw permissions from phpMyAdmin down for the apache user and www group (how both Apache and php-fpm run). I'm completely stuck/baffled and a pointer in the right direction would be greatly appreciated.
Server is a new virtual machine running CentOS9, PHP 8.2.8 (from the Remi repo) and MariaDB 10.5.
I guess I wasn't clear enough. When I say I added an error to the config.inc.php, I edited it to add text ("this should produce and error") to the file. Very common tactic I've used for years to purposefully produce an error for debugging. The setting for php error logging is irrelevant as this should produce a fatal error, but just for kicks:
; https://php.net/error-reporting
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
; This directive controls whether or not and where PHP will output errors,
; notices and warnings too. Error output is very useful during development, but
; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse.
; For production environments, we recommend logging errors rather than
; sending them to STDOUT.
; Possible Values:
; Off = Do not display any errors
; stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
; On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
; https://php.net/display-errors
display_errors = On
; The display of errors which occur during PHP's startup sequence are handled
; separately from display_errors. We strongly recommend you set this to 'off'
; for production servers to avoid leaking configuration details.
; Default Value: On
; Development Value: On
; Production Value: Off
; https://php.net/display-startup-errors
display_startup_errors = Off
; Besides displaying errors, PHP can also log errors to locations such as a
; server-specific log, STDERR, or a location specified by the error_log
; directive found below. While errors should not be displayed on productions
; servers they should still be monitored and logging is a great way to do that.
; Default Value: Off
; Development Value: On
; Production Value: On
; https://php.net/log-errors
log_errors = On
This is the first few lines of my config.inc.php
[root@mps config]# more /etc/phpMyAdmin/config.inc.php
<?php
this should produce an error
echo $blah->blah->blah
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use setup/
*
* All directives are explained in documentation in the doc/ folder
* or at <https://docs.phpmyadmin.net/>.
*/
phpMyAdmin was installed via the dnf package manager. As stated in the original post, there are no errors in the httpd log or the php-fpm log
[root@mps httpd]# more xxxxxxxxxx.xx-error_log
[root@mps httpd]#
[root@mps ~]# cat /etc/php-fpm.d/xxxxxxxxxx.conf | grep error_log
php_admin_value[error_log] = /var/log/php-fpm/php-fpm_xxxxxxxxxx.xx-error.log
[root@mps ~]# more /var/log/php-fpm/php-fpm_xxxxxxxxxx.xx-error.log
more: cannot open /var/log/php-fpm/php-fpm_xxxxxxxxxx.xx-error.log: No such file or directory
[root@mps ~]#