The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
prorecting multiple pages in different folders
#11
Ok. We can figure this out.

What does the error say?

Here are a few things to check.
1. Did you modify helpers.php or us_helpers.php? (This would tell us if a function was broken during modifications).
2. If you go into the admin panel and click on admin pages, does account.php have the "user" permission group assigned to it?
3. Did you modify the header or anything at the top of the page on any of your redirecting pages where you might have gotten rid of the include of the init.php?
4. Last try... go into account.php and change line 25 to
Code:
<?php //if (!securePage($_SERVER['PHP_SELF'])){die();}

Did that fix the error?
  Reply
#12
1. I didnt modify helpers.php or us_helpers.php
2 account.php have the “user” permission group assigned to it?
3 yes i did modifed the top of the page of my redirecting page. am sure the issue started when i created a new folder. my index.php is in another folder : here is the index page am redirecting to. <?php
//require users/init.php in users folder . cc is my app root
require_once $_SERVER['DOCUMENT_ROOT'].'/cc/users/init.php';
//require_once $abs_us_root.$us_url_root.'users/includes/header.php';
//require_once $abs_us_root.$us_url_root.'users/includes/navigation.php';
?>
<?php if (!securePage($_SERVER['PHP_SELF'])){die();}
//will be using theses variables on the page
$get_info_fname = $user->data()->fname;
$get_info_lname = $user->data()->lname;
$get_info_id = $user->data()->id;
$get_info_email = $user->data()->email;
$get_info_username = $user->data()->username;
echo 'Welcome moderator';?>
  Reply
#13
4 slashing out line 25 did not fix it
error:The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

This problem can sometimes be caused by disabling or refusing to accept cookies.

actually i get redirected to the page but the page contents does not load. i see the above error.
  Reply
#14
i av to add this . This error does not occour in pages inside users folder.so am sure //require users/init.php in users folder . cc is my app root
require_once $_SERVER[‘DOCUMENT_ROOT’].’/cc/users/init.php’; is the problem
  Reply
#15
Ahh. Ok. So don't use $_SERVER[‘DOCUMENT_ROOT’] on your include or figure out where that is pointing you.

The quickest thing to do is to change the line

Code:
require_once $_SERVER[‘DOCUMENT_ROOT’].’/cc/users/init.php’;
to
Code:
require_once 'http://mydomain.com/users/init.php';

See if that fixes it.
  Reply
#16
Warning: require_once(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in C:\xampp\htdocs\cc\ojisedash\index.php on line 2

Warning: require_once(http://localhost/cc/users/init.php): failed to open stream: no suitable wrapper could be found in C:\xampp\htdocs\cc\ojisedash\index.php on line 2

Fatal error: require_once(): Failed opening required 'http://localhost/cc/users/init.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\cc\ojisedash\index.php on line 2
  Reply
#17
i think the solution will be to redirect to a unique pages based on group e.g user to account.php, admin to admerror.php,moderator to moderror.php(not login, i mean redirect after visiting an unauthorized page). ust like we did with login redirect
  Reply
#18
Yep. Agreed on that.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)