If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

Can't Access phpMyAdmin

Started by sasablogger, Sep 02, 2024, 12:36 AM

Previous topic - Next topic

sasabloggerTopic starter

There is a server on which everything has been working for a year. There is centos 7 + Nginx + php-fm (php 7.4) and phpmyadmin.

The server owner swears that no one has done anything there since my last visit. Now I can't log in to phpmyadmin, after entering the login and password there is a redirect to /phpmyadmin/index.php?token=4bcb61f0b0885dd79c40c26e49967d67

I rebooted the server, it didn't help, I deleted/installed phpmyadmin - it didn't help. There is plenty of free space on the server. The database works, requests from php scripts pass.

Tried googling - they say you need to write session.save_path in php.ini

I uploaded PHPInfo, it shows that php.ini is located here /etc/php.ini, and session.save_path is written /var/lib/php/session

I open it manually, all session.save_path directives are commited. I don't know how everything worked before, but oh well, I write session.save_path = "/tmp" and reboot PHP, no use. PHPInfo still shows /var/lib/php/session. In general, I can't get into mayadmin yet.

What should I do?
  •  


MaribelZuc

It seems like there's a bit of confusion with the php.ini settings. When you modify php.ini and don't see changes, it usually means PHP-FPM hasn't been properly restarted. So, let's make sure you're doing that right.

Double-Check the php.ini Path: You mentioned PHPInfo shows the php.ini path as /etc/php.ini. Make sure that's the file you're editing. Sometimes, there could be another php.ini lurking around, especially if there are multiple PHP versions installed.

Edit the Correct Line: Ensure that the session.save_path line is uncommented and correctly set. It should look like this:

session.save_path = "/tmp"
Restart PHP-FPM Properly: After editing, you'll need to restart PHP-FPM to apply the changes. Use the following command:

sudo systemctl restart php-fpm
Check Nginx Configuration: Make sure your Nginx is correctly configured to work with PHP-FPM. Sometimes a misconfiguration here can cause issues.

Permissions on /tmp: Ensure that the /tmp directory is writable by the PHP process. You can check permissions with:

ls -ld /tmp
It should be writable by all users. If not, you can change it with:

sudo chmod 1777 /tmp
SELinux Settings: If SELinux is enabled, it might be blocking PHP from writing sessions. You can temporarily set SELinux to permissive mode to test this:

sudo setenforce 0
If this solves the issue, you'll need to configure SELinux properly.

Check PHP-FPM Logs: Look at the PHP-FPM logs for any errors that might give you more insight. They're usually located at /var/log/php-fpm/error.log.

Try a Different Browser: Sometimes, browser cache or cookies can cause issues. Try logging in to phpMyAdmin from a different browser or an incognito window.

PHPMyAdmin Configuration: Ensure that the phpMyAdmin configuration file is correct. Sometimes, a misconfiguration there can cause issues as well.
  •  

sebco

What MySQL version ya got?

PHPMyAdmin, what version ya usin'?

Any kinda panel on that server?

Adminer be best.
  •  

Orascerie

Somthing's not adding up here. Maybe the directory permissions got switched, or perhaps sessions started being logged by a different user. It could also be that the user's rights were altered.
  •  


If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...