{"id":1439,"date":"2015-02-15T01:54:54","date_gmt":"2015-02-15T07:54:54","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=1439"},"modified":"2026-03-26T23:49:24","modified_gmt":"2026-03-27T05:49:24","slug":"phpmyadmin-error-access-denied-unable-to-establish-a-php-session","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/phpmyadmin-error-access-denied-unable-to-establish-a-php-session\/","title":{"rendered":"Fix phpMyAdmin \u201cUnable to Establish a PHP Session\u201d Error in cPanel"},"content":{"rendered":"\n<p>When accessing <strong>phpMyAdmin<\/strong> through cPanel, you may encounter the following error:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>\u201cAccess Denied \u2014 Unable to establish a PHP session. If you believe this is an error, contact your system administrator to review server settings.\u201d<\/strong><\/p>\n<\/blockquote>\n\n\n\n<p>This issue usually occurs due to incorrect <strong>ownership<\/strong> or <strong>permissions<\/strong> of the <strong>tmp directory<\/strong> inside the cPanel user\u2019s home directory. PHP sessions rely on this directory, and improper configuration prevents phpMyAdmin from creating session files.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cause of the Issue<\/h2>\n\n\n\n<p>Each cPanel account requires a properly configured <strong>tmp folder<\/strong> located at:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/home\/username\/tmp<\/code><\/pre>\n\n\n\n<p>If the folder is missing or has incorrect permissions\/ownership, PHP session creation fails, resulting in the phpMyAdmin access error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution: Fix tmp Folder Permission and Ownership<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Login via SSH<\/h3>\n\n\n\n<p>Access your server using SSH as the <strong>root<\/strong> user.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh root@server-ip<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Verify tmp Directory<\/h3>\n\n\n\n<p>Navigate to the user\u2019s home directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/home\/username<\/code><\/pre>\n\n\n\n<p>Check if the tmp directory exists:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -la | grep tmp<\/code><\/pre>\n\n\n\n<p>Example incorrect output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>drwx------ 8 root root 4096 Apr 1 2013 tmp\/<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Correct Directory Permissions<\/h3>\n\n\n\n<p>The tmp folder permission should be <strong>755<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod 755 tmp<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Fix Ownership<\/h3>\n\n\n\n<p>Set ownership to the correct cPanel username:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chown username. tmp<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">If tmp Folder Does Not Exist<\/h2>\n\n\n\n<p>Create the directory manually and assign proper settings:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir tmp<br>chmod 755 tmp<br>chown username. tmp<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Final Result<\/h2>\n\n\n\n<p>After correcting permissions and ownership, reload phpMyAdmin from cPanel. The PHP session error should now be resolved successfully.<\/p>\n\n\n\n<p>If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b\"><\/a><\/span><\/span><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\">Facing issues? <\/p>\n\n\n\n<p class=\"has-large-font-size\">Our technical support<br>engineers can solve it. <\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img fetchpriority=\"high\" decoding=\"async\" width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>When accessing phpMyAdmin through cPanel, you may encounter the following error: \u201cAccess Denied \u2014 Unable to establish a PHP session. If you believe this is an error, contact your system&hellip;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[5,6],"tags":[],"class_list":["post-1439","post","type-post","status-publish","format-standard","hentry","category-general-topics","category-linux-basics"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/1439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=1439"}],"version-history":[{"count":3,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/1439\/revisions"}],"predecessor-version":[{"id":16740,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/1439\/revisions\/16740"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=1439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=1439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=1439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}