PDA

View Full Version : PHPMyAdmin error: Unable to establish a PHP session, Access Denied 401



Fli
12-17-2014, 01:29 AM
When accessed PHPMyAdmin from my cpanel hosting account i got 401 Access Denied error with message "Unable to establish a PHP session".

What fixed this is to go to cPanel / File manager and make sure /home/username/tmp directory exist and has 755 permissions..

IntegralHost
01-11-2015, 07:55 AM
Some times /tmp permission too cause this issue. you have to confirm the "session.save_path" on php.ini and check the permission of that path.

Rex_M
08-04-2022, 01:06 PM
Hello Fli,

I hope you are doing well!

Usually, this error occurs when the permission or ownership of the tmp folder for this user is wrong. Thus, ensure the ownership of /home/$username/tmp folder is set to $user and permission as 755. If you have the above settings are accurate, you won't get this error. Also, you will have to follow the below steps to resolve the problem.

Step-1 SSH into the server as root.
Step-2 Check the permission and ownership of /home/$user/tmp folder. Set ownership as $user.
# chown $user. /home/$user/tmp
Step-3 Set the permission of the tmp folder to 755.
#chmod 755 /home/$user/tmp
Step-4 Restart the PHP service and check if the error is gone.

Here, the '$user' can be replaced with your respective username.

If you think the error above is inadvertent, you will have to contact your system administrator and tell them to review your server settings.

----------------------
Regards,
Rex_M