Forums / General Questions / logoff page isn't redirecting properly

logoff page isn't redirecting properly

Started by congerman on 1 Mar 2016, 6:34 PM · Views: 5,156

Results 41 to 58 of 58
19 May 2018, 12:32 AM
#41
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

logoff page isn't redirecting properly

Didn't work :(:(:(

Here is the complete file:

<?php
/**
 * logoff header_php.php 
 *
 * @package page
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: header_php.php 5403 2006-12-27 00:38:58Z drbyte $
 */

// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_LOGOFF');

require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
$breadcrumb->add(NAVBAR_TITLE);

/**
 * Check what language should be used on the logoff screen
 */
  $logoff_lang = ($_SESSION['languages_code'] != DEFAULT_LANGUAGE) ? 'language=' . $_SESSION['languages_code'] : '';

/**
  * Check if there is still a customer_id
  * If so, kill the session, and redirect back to the logoff page
  * This will cause the header logic to see that the customer_id is gone, and thus not display another logoff link
  */
if (!empty($_SESSION['customer_id']) || !empty($_SESSION['customer_guest_id'])) {
  zen_session_destroy();
  unset($_SESSION['customer_id']);
  unset($_SESSION['customer_guest_id']);  
  zen_redirect(zen_href_link(FILENAME_LOGOFF, $logoff_lang));
}

// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_LOGOFF');
?>
20 May 2018, 4:36 AM
#42
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: logoff page isn't redirecting properly

Anyone else have any suggestions please?

20 May 2018, 9:32 AM
#43
congerman avatar

congerman

Zen Follower

Join Date:
Oct 2008
Posts:
392
Plugin Contributions:
0

Re: logoff page isn't redirecting properly

Did you try configuration - settings - recreate sessions - false

21 May 2018, 5:33 AM
#44
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: logoff page isn't redirecting properly

Another is, in the directory: includes/mods/pages/logoff, how many files are present and what are their names?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

21 May 2018, 6:54 AM
#45
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: logoff page isn't redirecting properly

I assume you mean modules, not mods (in the path), as i have no mods folder?

If so, there is only one file, called header_php.php, which is the one posted above.

21 May 2018, 12:07 PM
#46
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,120
Plugin Contributions:
56

Re: logoff page isn't redirecting properly

Are there any PHP files (other than class.products_viewed_counter.php) present in your /includes/classes/observers directory?

21 May 2018, 1:06 PM
#47
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: logoff page isn't redirecting properly

lat9:

Are there any PHP files (other than class.products_viewed_counter.php) present in your /includes/classes/observers directory?
Yes, there is:
class.google_recaptcha.php (which I'm actually not current using)
class.products_with_attributes_stock.php

21 May 2018, 1:11 PM
#48
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: logoff page isn't redirecting properly

ttfan:

Yes, there is:
class.google_recaptcha.php (which I'm actually not current using)
class.products_with_attributes_stock.php

Would recommend removing (renaming the extension to something other than .php) both includes/auto_loaders file for recaptcha as well as the above class file starting with the auto_loader.

Not using and having the file(s) present are two different things. Wouldn't expect an issue on logout, but....

If that doesn't fix, then do the same test with the products_with_attributes files.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

21 May 2018, 10:20 PM
#49
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: logoff page isn't redirecting properly

No such google_recaptcha file in the includes.auto_loaders folder.

Can try the products_with_attributes one. Will renaming these break the shop?

21 May 2018, 10:29 PM
#50
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: logoff page isn't redirecting properly

ttfan:

No such google_recaptcha file in the includes.auto_loaders folder.

Can try the products_with_attributes one. Will renaming these break the shop?
If just renaming the file(s) in the includes/auto_loaders directory, the store will operate but without the feature(s) added by the related file(s). By renaming the file(s) in the includes/classes/observers directory that do not begin with auto. there is a risk of error messages being generated.

Honestly I forget the actual action that occurs, I learned my lesson a long time ago and so install the auto_loaders type file last (if sequencing) and remove first if I want to disable something quickly.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

21 May 2018, 11:04 PM
#51
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: logoff page isn't redirecting properly

Thing is, is to briefly and quickly test if the situation is resolved. If it does not fix the situation, then restore and carry on.

Another thing to try is to work with a brand new installation on the same server then "piece-by-piece" build up to your current store and identify what action causes the problem to occur if the obvious actions that have been described don't fix it.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

22 May 2018, 10:24 AM
#52
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: logoff page isn't redirecting properly

mc12345678:

Thing is, is to briefly and quickly test if the situation is resolved. If it does not fix the situation, then restore and carry on.

Thank you again for the suggestion.

I tried it, still does not work.:(

How can logging out be something so tricky, when everything else is working properly, and no changes are made?

22 May 2018, 10:42 AM
#53
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: logoff page isn't redirecting properly

Here are the server settings.... since the site was moved, this is the only thing that's changed. Are any of these settings likely to change things?

Server Host: s121.syd1.hostingplatform.net.au (103.42.110.4)
Server OS: Linux 3.10.0-714.10.2.lve1.4.79.el7.x86_64
Server Date: 05/22/2018 20:38:33
Server Up Time: 20:38:33 up 95 days, 18:26, 0 users, load average: 6.34, 6.80, 5.64
HTTP Server: LiteSpeedPHP Version: 7.0.30 (Zend: 3.0.0)
PHP File Uploads: OnUpload
Max Size: 64M
PHP Memory Limit: 128MPOST
Max Size: 64MDatabase:
MySQL 10.2.14-MariaDBDatabase
Host: localhost (127.0.0.1)
Database Date: 05/22/2018 20:38:33
Database Data Size: 53,768 kB
Database Index Size: 10,729 kB
MySQL Slow Query Log Status: On
MySQL Slow Query
Log File: s121-slow.logMySQL Mode: (None set)

23 May 2018, 11:20 PM
#54
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: logoff page isn't redirecting properly

Can anyone else offer any suggestions... please?

25 May 2018, 10:13 AM
#55
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: logoff page isn't redirecting properly

Congerman:

Did you try configuration - settings - recreate sessions - false
I've tried that too, didn't make a difference. :(

27 May 2018, 1:40 AM
#56
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: logoff page isn't redirecting properly

As mention above, I'm running v1.5.5d

Below is an image of my php 7.0 settings. I wonder if one of these settings is perhaps not right?

[Attachment no longer available]

27 May 2018, 9:42 AM
#57
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: logoff page isn't redirecting properly

I'm not why it stopped displyaing in the previous post, but here it is again:
Attachment 17869

29 May 2018, 10:26 AM
#58
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: logoff page isn't redirecting properly

v1.5.5d
PHP 7.0
Theme: responsive sheffield blue
Plugins:
Products with attributes
Google Captcha

Anyone?