Cpanel/WHM Version 106.0.10 PHP Version 7.3.33
So i've got a website i have been using with another provider for years. It uses php for the backend. On transferring the site to a new host i was getting some strange problems where people logging in to different user accounts on the same computer, were logging is as the previously logged in user.
It is a 2 page site, it has an index where the user logs in, and a dashboard where the user uses the site. I was using session variables between the pages, and to retain data on a page refresh.
After many days of troubleshooting, i was able to determine that this is what was happening with my session variables:
I set a session variable. It sets fine and is usable on that page.
You refresh or change pages (like what would happen when you log out and in), and the session variable hangs on to it's existing value on the newly refreshed page for approximately one minute, even if you set it again. After approximately one minute, if you do another refresh, it has the new value that you set one minute ago.
After some days trying to troubleshoot this with my host, i decided right, seeing as the bulk of the site is a single page, i reprgorammed it to use standard variables rather than session variables. But lo and behold, even standard variables are usffering from this caching. So on a page refresh, even a plain old varibale is retaining an old value for a minute after a page refresh. They work fine if you stay on the same page and don't refresh.
Does anybody have any ideas as to why these variables, standard and session, would be retaining old values for a minute? I looked through the php settings in the php selector, and there doesn't appear to be any caching options being used. I don't understand all the settings, but i couldn't see any that were set to 60 seconds or one minute that might have been causing this. My install of CPanel has one caching tool installed, that is LSCache, but looking at it it appears this is only for Wordpress sites, and it doesn't detect any Wordpress sites.
My host is continuing to look into it, but thought i would see if i can get some more ideas.
So i've got a website i have been using with another provider for years. It uses php for the backend. On transferring the site to a new host i was getting some strange problems where people logging in to different user accounts on the same computer, were logging is as the previously logged in user.
It is a 2 page site, it has an index where the user logs in, and a dashboard where the user uses the site. I was using session variables between the pages, and to retain data on a page refresh.
After many days of troubleshooting, i was able to determine that this is what was happening with my session variables:
I set a session variable. It sets fine and is usable on that page.
You refresh or change pages (like what would happen when you log out and in), and the session variable hangs on to it's existing value on the newly refreshed page for approximately one minute, even if you set it again. After approximately one minute, if you do another refresh, it has the new value that you set one minute ago.
After some days trying to troubleshoot this with my host, i decided right, seeing as the bulk of the site is a single page, i reprgorammed it to use standard variables rather than session variables. But lo and behold, even standard variables are usffering from this caching. So on a page refresh, even a plain old varibale is retaining an old value for a minute after a page refresh. They work fine if you stay on the same page and don't refresh.
Does anybody have any ideas as to why these variables, standard and session, would be retaining old values for a minute? I looked through the php settings in the php selector, and there doesn't appear to be any caching options being used. I don't understand all the settings, but i couldn't see any that were set to 60 seconds or one minute that might have been causing this. My install of CPanel has one caching tool installed, that is LSCache, but looking at it it appears this is only for Wordpress sites, and it doesn't detect any Wordpress sites.
My host is continuing to look into it, but thought i would see if i can get some more ideas.
Last edited by a moderator: