junior admin problem
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
junior admin problem
phpbb2 Plus 1,52
Go to Administration Panel-----
--->Download-----
---->permissions-----
--->user permissions
Warning: Invalid argument supplied for foreach() in /home/httpd/vhosts/----------/includes/functions_jr_admin.php on line 161
General Error
The requested module does not exist or you are not an authorized user.
DEBUG MODE
Line : 49
File : /home/httpd/vhosts/-------------/admin/pagestart.php
Go to Administration Panel-----
--->Download-----
---->permissions-----
--->user permissions
Warning: Invalid argument supplied for foreach() in /home/httpd/vhosts/----------/includes/functions_jr_admin.php on line 161
General Error
The requested module does not exist or you are not an authorized user.
DEBUG MODE
Line : 49
File : /home/httpd/vhosts/-------------/admin/pagestart.php
- oxpus
- Administrator
- Beiträge: 28735
- Registriert: Mo 27.Jan, 2003 22:13
- Wohnort: Bad Wildungen
- Kontaktdaten:
Umpf.
That's an error I've till now no solution for it, but many request for.
Sorry for that answer, I don't know how to fix this.
BTW: Will this error comes up for each admin or only for users which will have be access to the ACP by the junior admin mod?
That's an error I've till now no solution for it, but many request for.
Sorry for that answer, I don't know how to fix this.
BTW: Will this error comes up for each admin or only for users which will have be access to the ACP by the junior admin mod?
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
i am as admin authorized my moderator user in junior admin part to be able to access to the administration panel. So, this moderator became a junior admin. He accesses to the administration panel with this authority.
When he accesses to download part for giving user permission, these errors exist that are related to user permission, all users permission, group user permission and all group user permission pa
thanks for your help
When he accesses to download part for giving user permission, these errors exist that are related to user permission, all users permission, group user permission and all group user permission pa
thanks for your help
- oxpus
- Administrator
- Beiträge: 28735
- Registriert: Mo 27.Jan, 2003 22:13
- Wohnort: Bad Wildungen
- Kontaktdaten:
Hm, so on all permission modules. Curious.
I'll try it later on myself to simulate this error, but on my board these errors never will be coming up.
EDIT
I cand reproduce the error, so I think i't a problem with your webspace configuration.
I'll try to find out how this security function works and why it will not works for you.
For doing that please post your php configuration here to be able to compare this with my settings.
EDIT2:
You can helps my while debugging:
Open the file includes/functions_jr_admin.php, find there
and replace there $debug = false; with $debug = true;
After this retry access the ACP with a testaccount or an junior admin and post the result which will be begin with "DEBUG - File Accessed - ". This may helps me to find the bug...
I'll try it later on myself to simulate this error, but on my board these errors never will be coming up.
EDIT
I cand reproduce the error, so I think i't a problem with your webspace configuration.
I'll try to find out how this security function works and why it will not works for you.
For doing that please post your php configuration here to be able to compare this with my settings.
EDIT2:
You can helps my while debugging:
Open the file includes/functions_jr_admin.php, find there
Code: Alles auswählen
function jr_admin_secure($file)
{
global $HTTP_GET_VARS, $HTTP_POST_VARS, $db, $lang, $userdata;
/* Debugging in this function causes changes to the way ADMIN users
are interpreted. You are warned */
$debug = false;After this retry access the ACP with a testaccount or an junior admin and post the result which will be begin with "DEBUG - File Accessed - ". This may helps me to find the bug...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
When i have replaced there $debug = false; with $debug = true; i haven’t accessed the administration panel.and the error that is below existed:
General Error
The requested module does not exist or you are not an authorized user.
DEBUG MODE
Line : 49
File : /home/httpd/------------------------/admin/pagestart.php
General Error
The requested module does not exist or you are not an authorized user.
DEBUG MODE
Line : 49
File : /home/httpd/------------------------/admin/pagestart.php
- oxpus
- Administrator
- Beiträge: 28735
- Registriert: Mo 27.Jan, 2003 22:13
- Wohnort: Bad Wildungen
- Kontaktdaten:
Hm, really courios. Okay, I'll test more at this point

EDIT
Found the possible error:
On your webspace the safe mode if enabled. Ask your hoster to disable this, because with safe mode = on global variables like $HTTP_SERVER_VARS will not work, but this variable is needed to avoid security risks on your ACP...
But before you asks your hoster, try this:
EDIT
Found the possible error:
On your webspace the safe mode if enabled. Ask your hoster to disable this, because with safe mode = on global variables like $HTTP_SERVER_VARS will not work, but this variable is needed to avoid security risks on your ACP...
But before you asks your hoster, try this:
Code: Alles auswählen
#
#-----[ OPEN ]-----
#
admin/pagestart.php
#
#-----[ FIND ]-----
#
elseif (!jr_admin_secure(basename($HTTP_SERVER_VARS['REQUEST_URI'])))
#
#-----[ REPLACE WITH ]-----
#
elseif (!jr_admin_secure(basename($_SERVER['REQUEST_URI'])))
#
#-----[ SAVE/CLOSE ALL FILES ]-----
#
# EoMKarsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
my cod
Code: Alles auswählen
<?php
/***************************************************************************
* pagestart.php
* -------------------
* begin : Thursday, Aug 2, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: pagestart.php,v 1.1.2.7 2004/03/24 14:43:31 psotfx Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if (!defined('IN_PHPBB'))
{
die("Hacking attempt");
}
define('IN_ADMIN', true);
// Include files
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
include_once($phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx);
find_lang_file_nivisec('lang_jr_admin');
global $HTTP_SERVER_VARS;
if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
{
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['server_name'])), '', $HTTP_SERVER_VARS['REQUEST_URI']);
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['script_path'])), '', $url);
$url = str_replace('/', '/', $url);
$url = preg_replace('/sid=([^&]*)(&?)/i', '', $url);
$url = preg_replace('/?$/', '', $url);
$url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id'];
redirect("index.$phpEx?sid=" . $userdata['session_id']);
}
if (empty($no_page_header))
{
// Not including the pageheader can be neccesarry if META tags are
// needed in the calling script.
include('./page_header_admin.'.$phpEx);
}
?>
Zuletzt geändert von uzay am Di 28.Sep, 2004 19:16, insgesamt 1-mal geändert.
- oxpus
- Administrator
- Beiträge: 28735
- Registriert: Mo 27.Jan, 2003 22:13
- Wohnort: Bad Wildungen
- Kontaktdaten:
This is correct:
On your file a required code for the junior admin will be missed, so the script must run into an error.
Code: Alles auswählen
<?php
/***************************************************************************
* pagestart.php
* -------------------
* begin : Thursday, Aug 2, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: pagestart.php,v 1.1.2.4 2002/11/30 21:37:43 psotfx Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if (!defined('IN_PHPBB'))
{
die("Hacking attempt");
}
define('IN_ADMIN', true);
// Include files
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
include_once($phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx);
find_lang_file_nivisec('lang_jr_admin');
if (!$userdata['session_logged_in'])
{
redirect(append_sid("login.$phpEx?redirect=admin/", true));
}
elseif (!jr_admin_secure(basename($HTTP_SERVER_VARS['REQUEST_URI'])))
{
message_die(GENERAL_ERROR, $lang['Error_Module_ID'], '', __LINE__, __FILE__);
}
if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
{
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['server_name'])), '', $HTTP_SERVER_VARS['REQUEST_URI']);
$url = str_replace(preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['script_path'])), '', $url);
$url = str_replace('//', '/', $url);
$url = preg_replace('/sid=([^&]*)(&?)/i', '', $url);
$url = preg_replace('/?$/', '', $url);
$url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id'];
redirect("index.$phpEx?sid=" . $userdata['session_id']);
}
if (empty($no_page_header))
{
// Not including the pageheader can be neccesarry if META tags are
// needed in the calling script.
include('./page_header_admin.'.$phpEx);
}
?>Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
- oxpus
- Administrator
- Beiträge: 28735
- Registriert: Mo 27.Jan, 2003 22:13
- Wohnort: Bad Wildungen
- Kontaktdaten:
Just use the code above as your pagestart.php. That's all.
Without the required code
the ACP will run into an error, because the needed security isn't given.
So I've fix your pagestart.php to enable the junior admin to work.
Without the required code
Code: Alles auswählen
elseif (!jr_admin_secure(basename($HTTP_SERVER_VARS['REQUEST_URI'])))
{
message_die(GENERAL_ERROR, $lang['Error_Module_ID'], '', __LINE__, __FILE__);
}So I've fix your pagestart.php to enable the junior admin to work.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
First of all, i could’t understand which code i should use as my pagestart.php. if i use my pagestart.php that i posted before to you , is it ok?
Second, what for is the code you sent me ? where i must use it in ? where is its location in pagestart.php ? or should i use it itself only as pagestart.php ?
Third, you said that you had fix my pagestart.php to enable the junior admin to work. But i couldn’t understand where you have fix .
I will be glad you if you show the way in these problems. Thanks.
Second, what for is the code you sent me ? where i must use it in ? where is its location in pagestart.php ? or should i use it itself only as pagestart.php ?
Third, you said that you had fix my pagestart.php to enable the junior admin to work. But i couldn’t understand where you have fix .
I will be glad you if you show the way in these problems. Thanks.
- oxpus
- Administrator
- Beiträge: 28735
- Registriert: Mo 27.Jan, 2003 22:13
- Wohnort: Bad Wildungen
- Kontaktdaten:
My postet pagestart.php is your file with the needed fix to works with the junior admin.
So copy the code into your pagestart.php and use the file. After a retry you may be able to access the ACP with a junior admin.
So copy the code into your pagestart.php and use the file. After a retry you may be able to access the ACP with a junior admin.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
error again
Warning: Invalid argument supplied for foreach() in /home/httpd/vhosts/----------/includes/functions_jr_admin.php on line 161
General Error
The requested module does not exist or you are not an authorized user.
DEBUG MODE
Line : 49 instead of 50File : /home/httpd/vhosts/-------------/admin/pagestart.php
Warning: Invalid argument supplied for foreach() in /home/httpd/vhosts/----------/includes/functions_jr_admin.php on line 161
General Error
The requested module does not exist or you are not an authorized user.
DEBUG MODE
Line : 49 instead of 50File : /home/httpd/vhosts/-------------/admin/pagestart.php
got the same error.
your changes were already implemented in my original code but doesn´t work.
changing to $_SERVER didn´t help me too
your changes were already implemented in my original code but doesn´t work.
changing to $_SERVER didn´t help me too
Zuletzt geändert von dagobert am Mi 06.Okt, 2004 15:09, insgesamt 2-mal geändert.
- oxpus
- Administrator
- Beiträge: 28735
- Registriert: Mo 27.Jan, 2003 22:13
- Wohnort: Bad Wildungen
- Kontaktdaten:
Hm, I think a problem with your webspace, so try this:
Code: Alles auswählen
#
#-----[ OPEN ]-----
#
includes/functions_jr_admin.php
#
#-----[ FIND ]-----
#
function jr_admin_check_file_hashes($file)
{
global $phpbb_root_path, $phpEx, $userdata;
#
#-----[ AFTER, ADD ]-----
#
global $module;
#
#-----[ SAVE_CLOSE ALL FILES ]-----
#
# EOMKarsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
no way.same error 
(on webspaces of 2 different providers all-inkl and hosteurope)
(on webspaces of 2 different providers all-inkl and hosteurope)
Zuletzt geändert von dagobert am Mi 06.Okt, 2004 19:23, insgesamt 1-mal geändert.
- oxpus
- Administrator
- Beiträge: 28735
- Registriert: Mo 27.Jan, 2003 22:13
- Wohnort: Bad Wildungen
- Kontaktdaten:
Can you post your phpinfo here or if you wants per pn?
Something must be different to my board.
I'm running a plus on all-inkl.com too and there's no error
Something must be different to my board.
I'm running a plus on all-inkl.com too and there's no error
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!