Reputation: 11
operating system: RockyLinux 8
apache version: 2.4.37
php version: 7.2.24 (cli)
script location: /var/www/html
phpMyAdmin version: 5.2.0
please do the following:
$ sudo useradd -d /var/www/ -m -U -s /sbin/nologin www
change the lines in the file /etc/httpd/conf/httpd.conf
User www
Group www
change the lines in the file /etc/php-fpm.d/www.conf
user = www
group = www
listen.acl_users = www,nginx
restart Apache and PHP-FPM
$ sudo systemctl restart httpd
$ sudo systemctl restart php-fpm
open the page in a browser, you will see a white screen
now, set for php-fpm configuration user
as apache
and group
as apache
change the lines in the file /etc/php-fpm.d/www.conf
user = apache
group = apache
restart PHP-FPM
$ sudo systemctl restart php-fpm
now you see the main page of the phpMyAdmin script in a browser
what's the matter here? Thank you!
Upvotes: 1
Views: 294
Reputation: 445
I was having these exact same symptoms in my Rocky 8 environment. Basically trying to run the entire LAMP service as a user other than "apache", would cause phpMyAdmin to show a blank screen, while all other PHP scripts still worked fine.
The solution for me was to change the permissions of three folders within /var/lib/php directory:
/var/lib/php/opcahce
/var/lib/php/session
/var/lib/php/wsdlcache
These were all set to root:apache ownership with file permissions 770 (rwxrwx---).
By modifying the permissions on these three folders to be writable by the new user (non apache) that is running the httpd & php-fpm services, the phpMyAdmin page began working again. In my case I simply changed the ownership to root:newuser ("newuser" being the user running the services rather than apache).
Environment:
Rocky Linux 8.7: 4.18.0-425.3.1.el8.x86_64
WEB: Apache/2.4.37 (rocky) OpenSSL/1.1.1k SVN/1.14.1
PHP: 7.4.30
Upvotes: 0