I have about 4 folderts with and index.HTML which I will change to .php extension of course. The issue is this : the index files rely on CSS files in CSS folder and js too. How do I protect the index.php pages Thank you
prorecting multiple pages in different folders
I was able to use get my folders listed in the US pages on admin manage page by editing the path line in INI.php . how ever after setting the pages to private they are still opened as public when I load the page. I then add the if statement checkiing login status in blank_page .php but I get require once error .pls help
Sorry. I don't think editing the ini file is the way to do it. You need to edit the z_us_root file in the root folder of userspice. That contains an array of all of the folders that you want userspice to look at
great! it worked my other folders now shows in admin manage page. but i still had errors requiring ini.php in users folder. i solved this with :require_once $_SERVER['DOCUMENT_ROOT'].'/userspice/users/init.php'; i dont knw if i have break anything. i need the proper way to do this. Thanks
That shouldn't break anything. Normally you can do a relative path for that but if the server root thing works for you then go for it.
We couldn't do that by default because different servers treat that differently.
We couldn't do that by default because different servers treat that differently.
Thank you
Just discovered an issue ! By default users are sent to account.php if they visit a page they are not registers as group member . i get redirecting error now instead of redirecting to account.php .
Ahh. Yes. Every new user needs to be added as "user" even if they are part of another group? Did you uncheck the user box when you were creating your users?
all users a in user group. still geting error: The page isn’t redirecting properly
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
Did that fix the error?
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
<?php //if (!securePage($_SERVER['PHP_SELF'])){die();}
Did that fix the error?
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
Did that fix the error?
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
<?php //if (!securePage($_SERVER['PHP_SELF'])){die();}
Did that fix the error?
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';?>
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';?>
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.
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.
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
require_once $_SERVER[‘DOCUMENT_ROOT’].’/cc/users/init.php’; is the problem
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
See if that fixes it.
The quickest thing to do is to change the line
require_once $_SERVER[‘DOCUMENT_ROOT’].’/cc/users/init.php’;
torequire_once 'http://mydomain.com/users/init.php';
See if that fixes it.
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
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
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
Yep. Agreed on that.