phpmyadmin / phpmyadmin

A web interface for MySQL and MariaDB
https://www.phpmyadmin.net/
GNU General Public License v2.0
7.23k stars 3.39k forks source link

We are unable to scale out phpmyadmin for multi instance session #18733

Open shivanisinghnitp opened 1 year ago

shivanisinghnitp commented 1 year ago

Describe the bug

We are using phpmyadmin for wordpress. So when we are trying to save session in remote persistent storage then we get this error (ss attached below). In session.save_path attribute in the php.ini file when i am putting '/home/site/php/tmp" then it is throwing a white page error. I have attached a screenshot for the same. This is happening because of user mismatch , i.e. the user of persistent remote stoarage folder is nobody while phpmyadminserver runs as nginx or root user. When we use local storage to store sessions then this issue is not coming, but by doing that we are unable to scale up our Wordpress website.

So, is there a way to avoid this user id mismatch? I mean is there some code in the folder which checks for user id mismatch so that we can go past that?

Or could you please suggest any other solution?

To Reproduce

Try saving phpmyadmin session in multi instance remote storage.

Expected behavior

phpmyadmin should not throw white page error

Screenshots

MicrosoftTeams-image

Server configuration

Client configuration

Additional context

Add any other context about the bug here.

kamil-tekiela commented 1 year ago

We are using phpmyadmin for wordpress.

I don't think I really understand this statement because these are two completely unrelated products. On top of that, if you are using WordPress you should have no reason to access the database via tools such as phpMyAdmin. I assume you mean that you use both products for unrelated stuff and they are installed on the same server.

The error you are seeing is not coming from phpMyAdmin. It comes from PHP. While it could be a bug in phpMyAdmin, the current information you showed doesn't seem to indicate so.

This is happening because of user mismatch , i.e. the user of persistent remote stoarage folder is nobody while phpmyadminserver runs as nginx or root user.

Web Apps should never run as root. If it did run as root I don't think you would even see this error. I would recommend you first recheck your PHP installation. Try to recreate this problem in a simple PHP script and work out what the actual permission issue is. I doubt there is anything we can do in phpMyAdmin to solve this for you.

shivanisinghnitp commented 1 year ago

No, we are actually providing WordPress as a service to our customers and to administer our mysql database we are using phpmyadmin. So, all phpmyadmin login page throws this error hence we though that this a phpmyadmin issue. Also, does phpmyadmin not maintain login sessions? And if it does then does it provide anyway to save the sessions in database?