Here are the codes we changed to fix the Logout issue did it cause us to be locked out of Perch CMS?
We have version 3.1.4 of Perch with Version 1.4 of Members only section. Members only section pages (not coding) are highly customized so we would prefer to keep them as there are if possible, but need the logout page to work correctly
from logout.php file
PHP
- <?php include('../pggs2.8.6_update/runtime.php'); //perch_member_remove_tab('members'); perch_member_log_out(); //echo '<br /><br /><br /><br />'; //echo'print('session_name()')';
- //$_SESSION = array();
- //if (isset($_COOKIE[session_name("p_m")])) //setrawcookie(('p_m'), "", time(-3600)); if (isset($_COOKIE[session_name("p_m")])) {setcookie(session_name("p_m"), "", -3600); echo 'inside if statement' . $_session_name() . ';}
- //if (session_status() == PHP_SESSION_ACTIVE) { session_destroy()'; }
- //perch_member_logged_in(NULL);
- //$page = $_SERVER['PHP_SELF'];
- //$sec = "10";
- echo 'Our advanced security system requires that you close down your browser when you have finished.<br />';
- echo '<a href="https://palam.org">Click for PALAM Homepage</a>'; PerchUtil::redirect('/members/');
- Core file lines that were modified
- starts line 228
- public static function redirect($url, $status = 302)
- {
- if (!self::$hold_redirects) {
- PerchSession::close();
- http_response_code($status);
- //header('Location: ' . $url);
- exit;
- } else {
- PerchUtil::debug("Redirect held: $url");
- }
- }
- We were getting header error notifications on the logout page So you can see what we did.
- Did this lock up out? If you how do we change the logout page code and the core code so the logout and login to the CMS work.
- The logout page is now not throwing errors in the Members only section.