You are here:  » Admin logging out


Admin logging out

Submitted by philstone on Mon, 2019-01-07 12:39 in

Happy New year to You David!

Hope you had a nice festive season!

I was wanting to ask about an issue i'm having with the admin area of my site, i'm now running the site via a cloudflare CDN setup which is working great apart from the admin area i keep getting logged out on specific pages, is there a fix that would help me not be logged in? there are some pages i can't see in the admin area unless i turn off the password which obviously i did for a few seconds only to see if everything is ok when turned off which it was.

one other issue as part of this is the remove.php file you created for me (to remove empty mapped products) as it takes some time to work 'times out' even with the set limit code included and i see a cloudflare error page, is there any other way i could get this to work in the backgroud like the import.php file works?

just so you know the daily import is working perfectly.

thanks in advance for your help!

Regards

Phil Stone

Submitted by support on Mon, 2019-01-07 13:02

Hi Phil,

Regarding staying logged in to admin, it sounds like you are presenting a variable IP address which can happen over CDN networks. The IP (until 15/09A) is used as as part of the login cookie hash so if you make this a fixed dummy value that should be all you need to do - edit includes/admin.php and look for the following code at line 863:

    $remoteAddr = (isset($_SERVER["REMOTE_ADDR"])?$_SERVER["REMOTE_ADDR"]:"");

...and REPLACE with:

    $remoteAddr = "127.0.0.1";

Regarding remove.php, if you make a copy of the script in the scripts/ folder, and then look for the following code at line 3:

  require("includes/common.php");

...and REPLACE with:

  require("../includes/common.php");

...and then try setting it up as a cronjob exactly as you are running cron.php (or maybe import.php in your set-up) and schedule it to run as required...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com