1

I'm currently trying to move a Joomla site to another host. For testing I created a duplicate of the site with a different domain (I don't know if this has anything to do with my problem).

The problem is that I can't login anymore. The administrator login (/administrator) works fine, but I cannot login with the login form on the Joomla site itself. I enter my credentials correctly, but then Joomla redirects me back to the login page.

I looked into the database into the session table, and there is an entry with my username. But also now there is another guest-entry, with the same sessionId as the cookie in my browser now has.

If I check "remember login" in the login form, then I can login. But every time I load a page of my Joomla site, a new session is created in the database (because Joomla "forgets" my session every time and the "remember me" creates a new session for me every time, I think). And I then cannot logout anymore.

Does anyone have an idea where the problem is, and what I can do? By the way I'm very new to Joomla (I have to maintain an existing site). We're using Joomla 3.7.3 and PHP 5.6.40 (I cannot update because of too much customisation from my predecessor, currently I'm creating a completely new website).

1

I fixed the problem myself. Unfortunately, it was even my own mistake, you couldn't have come up with the solution. I don't access the Joomla site directly but there is an HTTP gateway before it. The problem was that Joomla sends two "Set-Cookie" headers in the Login-Response, but my gateway merged them and only sent the second one back to the browser. After I changed the code so it can handle multiple http headers with the same key, the login works fine.

  • 1
    Thanks for coming back to let us know the solution. You should accept your own answer so it shows as solved. – Irata Jun 16 at 23:52
0

Two suggestions.

1 - Move the site to the other host using Akeeba Backup, which is easier and you are less likely to make errors during the process. https://www.akeebabackup.com/

2- Use PHP 7.2.x. Even that Joomla mention PHP 5 as minimum, PHP 7 is recommended and yes you need to update your site to the latest Joomla 3 version. Normally the customisations that you mention should not be a problem as soon as he/she has not touched core Joomla files.

Good luck!

  • As I said it is not possible to update to PHP 7. I don't know what he had customised, but I know that this Joomla installation will not run with PHP 7. I can try Akeeba, but I hope I can found an solution to my initial problem. And maybe Akkeba won't work because of the mass of customisation. – Sumafu Jun 16 at 10:26
0

Under the Global Configuration settings menu item and the Site tab is there a value in the 'Cookie Settings' or 'Cookie Path' and if so do they reflect the domain of where you have copied the Joomla site.

Both fields can be blank and I think this is the recommendation these days.

  • There are blank, as in the original installation – Sumafu Jun 16 at 10:18
  • @Sumafu thank you for replying. That removes a couple of possible causes for your issue. – Irata Jun 16 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.