gilliancowe
Starting Member
United Kingdom
14 Posts Pre-sales questions only (More Details...)
|
Posted - 08/20/2026 : 02:43:17
Hi,
I have moved hosting company, now using Siteground, and I am having issues logging in.
I login, see the screen with the message "You will now be forwarded to the admin home page.", but instead of taking me to the admin home page it just takes me back to the login page.
I searched the forum and saw that it might have something to do with the session variables, so I contacted support. They have come back and said,
"We can see that the POST request is successfully reaching the server directly (cache: MISS) and the authentication is successful; however, the proper session cookie, which should be set from within the script, is missing (Set-Cookie: PHPSESSID=)."
Can you help please, I don't know how to fix this.
Thank you, Gillian
|
Vince
Administrator
43585 Posts |
Posted - 08/21/2026 : 02:19:42
|
gilliancowe
Starting Member
United Kingdom
14 Posts Pre-sales questions only (More Details...)
|
Posted - 08/23/2026 : 05:33:02
Hi Vince,
Thank you for your reply. I have checked with the hosting company support and the caching is off. Here is their reply below.
"We can see the headers:
cache-control: no-store, no-cache, must-revalidate, max-age=0, s-maxage=0, post-check=0, pre-check=0 pragma: no-cache
I do understand the statement within the forum outlined in your screenshot; however, the caching is not causing the issue. The login details are accepted, but the store's PHP code fails to issue a session cookie (Set-Cookie: PHPSESSID=). Because no cookie is saved to the browser, the site forgets the visitor just logged in the moment it redirects to admin.php. The developer of the application needs to inspect the script code and investigate why it is failing to create or send that session cookie."
Can you help please? I have moved hosting companies a few times before and never had an issue.
Thank you, Gillian
|
dbdave
ECT Moderator
USA
10821 Posts |
Posted - 08/23/2026 : 11:59:05
Hi Gillian, Vince is the lead developer and really being that there are no other reports of this issue and no changes in your code, and you having just changes hosts, the most likely issue with with the host, or hosting plan setup. This kind of post pops up from time to time and in virtually all cases, it's a hosing issue. With so many folks using the admin daily, the forum would be very busy with the same posts. Here is one that it was an issue with php.ini https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=111087&SearchTerms=admin,login,redirectingI would ask the host to check again. Verify the session variables are working on the server too. If you don't mind, please let us know who the host is as it may help us if the issue has come up with this host before. Thanks, David
|
gilliancowe
Starting Member
United Kingdom
14 Posts Pre-sales questions only (More Details...)
|
Posted - 08/23/2026 : 14:21:35
Hi David,
Thank you for your reply. The host is Siteground.
I did see the post you linked to with the php.ini issue and checked, but that's not what's causing my issue.
I will go back to support.
Many thanks, Gillian
|
dbdave
ECT Moderator
USA
10821 Posts |
Posted - 08/23/2026 : 20:19:20
There is some code that can be run to test the server variables to see if they are working on the server. Post back what you find with the host and ask them the check the server variables to be sure they are working as this is a dynamic database driven website that will require them. Here is some code generated by AI for you to test with ADHERE TO THE FOLLOWING Save that as something like server-vars.php and load it in your browser.One important caution: don't leave the full $_SERVER test page publicly accessible after you're finished testing. Depending on the PHP configuration, it can expose information you wouldn't normally want visitors seeing.
<?php header('Content-Type: text/html; charset=utf-8');
echo '<h1>PHP Server Variables</h1>'; echo '<table border="1" cellpadding="6" cellspacing="0">'; echo '<tr><th>Variable</th><th>Value</th></tr>';
ksort($_SERVER);
foreach ($_SERVER as $key => $value) { if (is_array($value)) { $value = print_r($value, true); }
echo '<tr>'; echo '<td><strong>' . htmlspecialchars($key) . '</strong></td>'; echo '<td>' . htmlspecialchars((string)$value) . '</td>'; echo '</tr>'; }
echo '</table>'; ?>
Edited by - dbdave on 08/23/2026 20:19:56
|
gilliancowe
Starting Member
United Kingdom
14 Posts Pre-sales questions only (More Details...)
|
Posted - 08/24/2026 : 11:24:48
Hi David,
I did as you suggested and this is the reply from support.
"The provided screenshots are the presently set PHP variables obtained via a PHPinfo script. Do note that our hosting is optimized specifically for dynamic applications such as WordPress, Drupal, Joomla, etc, and we host tens of thousands of such sites. As such, had there been issues with the server setup, a lot of dynamic websites would have been completely inoperative. As such, the matter should be strictly reviewed by your website developer."
Thanks, Gillian
|
dbdave
ECT Moderator
USA
10821 Posts |
Posted - 08/24/2026 : 12:48:20
Ahhh Kicking the can down the road a bit I see.
Did you run my code?
David
|
gilliancowe
Starting Member
United Kingdom
14 Posts Pre-sales questions only (More Details...)
|
Posted - 08/24/2026 : 13:00:49
Hi David,
Yes I ran the code and sent the screenshots to the Siteground support.
Thanks, Gillian
|
dbdave
ECT Moderator
USA
10821 Posts |
Posted - 08/24/2026 : 15:56:58
Hi Gillian, I sent you a message requesting the screen capture(s)
David
|
gilliancowe
Starting Member
United Kingdom
14 Posts Pre-sales questions only (More Details...)
|
Posted - 08/25/2026 : 11:43:54
Hi David,
I have sent the screenshots as requested.
Many thanks, Gillian
|
dbdave
ECT Moderator
USA
10821 Posts |
Posted - 08/25/2026 : 12:54:30
Hi, I see in your screen capture you have multiple "Warning: Cannot modify header information - headers already sent" errors. I am thinking you have a BOM in your includes or one or more of your files, or some other corruption in the moving of the files. Start by downloading the includes.php file and open in notepad++ ( https://notepad-plus-plus.org/ ) and see if there are any strange characters at the start of the file. It might be helpful to know how you moved the files - did the host do it, you did you and if so was if via FTP or some other method? Are there any errors showing on the front end of the website? I had a look and found this - The PHP session has not been started. This can cause problems with the shopping cart function. Thanks, David
Edited by - dbdave on 08/25/2026 12:59:49
|
gilliancowe
Starting Member
United Kingdom
14 Posts Pre-sales questions only (More Details...)
|
Posted - 08/25/2026 : 14:03:19
Hi David,
I have checked the includes.php, no errors or unexpected characters.
The site was moved with a migration tool. It wasn't me that did it but I have a backup copy of the old site.
Only error I have found the on the front end is the one you have highlighted.
Thanks, Gillian
|
Vince
Administrator
43585 Posts |
Posted - 08/26/2026 : 01:45:51
|
gilliancowe
Starting Member
United Kingdom
14 Posts Pre-sales questions only (More Details...)
|
Posted - 08/26/2026 : 02:57:17
Hi Vince,
Thank you very much, I have sent an email.
Gillian
|
| |
|