Jump to content

Fresh Install of Prestashop - Login Loop


Recommended Posts

Posted (edited)

I just installed Prestashop and was able to login. When I login to the administrator page, I see the dashboard. However, when clicking on any of the other pages like settings, design, anything at all, it prompts me to login again. If I login, it then brings me back to the dashboard. This goes on forever.

Anyone else had this or know how to fix it? I've tried Zen browser, chrome, incognito, etc.

Sometimes it will let me login to certain pages briefly, but only once and a while.

Edited by SetLucas
added details (see edit history)
Link to comment
Share on other sites

Posted (edited)

I also tried connecting over http, but it gives me a "too many redirects" error.

It's constantly forwarding to: http://mywebsite.com/admin215rt34t34rt3ecmqf3w/index.php/security/compromised?uri=http%3A%2F%2Fmywebsite.com%2Fadmin215rt34t34rt3ecmqf3%2Findex.php%2Fsecurity%2Fcompromised%3F&_token=0Y4tVCoqvbgjhG9h2yxT0lMyzDdk

(I changed the domain, token and admin folder name for my security)

Should it be forwarding to security/compromised? That's an odd name for a web folder.

Some more details Ill add, it looks like it's always a 302 redirect.

I tried setting PS_COOKIE_SAMESITE to lax, no luck.

I increased the php memory limit to 512MB, no luck.

Edited by SetLucas
more steps I tried (see edit history)
Link to comment
Share on other sites

Just reinstalled from scratch again. Same exact issue. This is on a debian server using apache2 and php 8.1

<VirtualHost *:80> # or 443 for SSL support

    ServerName mydomain.com
    ServerAlias mydomain.com

    # SSLEngine on
    # SSLCertificateFile /etc/apache2/ssl/example.crt
    # SSLCertificateKeyFile /etc/apache2/ssl/example.key

    DocumentRoot /var/www/mywebsite.com
    <Directory /var/www/mywebsite.com>
        # enable the .htaccess rewrites
        AllowOverride All
        Options -Indexes
        Require all granted

        # Disable back office token
        # SetEnv _TOKEN_ disabled
    </Directory>

    ErrorLog /var/log/apache2/prestashop.error.log
    CustomLog /var/log/apache2/prestashop.access.log combined
</VirtualHost>

 

I also tried enabling SSL with certbot, and now it redirects with a 301 error infinitely on visiting any page, generating "too many redirects"

Link to comment
Share on other sites

On 5/7/2025 at 8:54 PM, SetLucas said:

I just installed Prestashop and was able to login. When I login to the administrator page, I see the dashboard. However, when clicking on any of the other pages like settings, design, anything at all, it prompts me to login again. If I login, it then brings me back to the dashboard. This goes on forever.

Anyone else had this or know how to fix it? I've tried Zen browser, chrome, incognito, etc.

Sometimes it will let me login to certain pages briefly, but only once and a while.

Hello,

Have you checked the value of PS_COOKIE_CHECKIP configuration table in the database?

If the value is 1, then set 0 and check again.

Thanks,

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...