The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Secure page not redirecting - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23) +--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26) +--- Thread: Secure page not redirecting (/showthread.php?tid=875) |
Secure page not redirecting - snifer999 - 12-05-2017 I am try to secure a page but when a user with no permission visit the page its not redirecting to index below is my code <?php require_once '../users/init.php'; require_once $abs_us_root.$us_url_root.'usersc/includes/map_header.php'; require_once $abs_us_root.$us_url_root.'usersc/includes/user_navigation.php'; ?> <?php if (!securePage($_SERVER['PHP_SELF'])){die();} ?> <div id="page-wrapper"> </div> <?php include $abs_us_root.$us_url_root.'usersc/includes/map_footer.php'; include $abs_us_root.$us_url_root.'users/includes/html_footer.php'; ERROR: [05-Dec-2017 14:38:47 Asia/Kuala_Lumpur] PHP Notice: Undefined variable: master_account in /home/t/users/helpers/us_helpers.php on line 438 [05-Dec-2017 14:38:47 Asia/Kuala_Lumpur] PHP Warning: in_array() expects parameter 2 to be array, null given in /home/t/users/helpers/us_helpers.php on line 438 ?> Secure page not redirecting - mudmin - 12-05-2017 A few questions... 1. What folder is this page in? 2. Is that folder added to z_us_root.php Because with your ../users it makes it look like your in a folder other than root or users. If it's not usersc then UserSpice doesn't know to look for it. So you edit that z_us_root.php file and add your folder to the array that's at the top of the file. |