Undefined index: HTTP_USER_AGENT
-
- BBCoder VI
- Posts: 765
- Joined: 25 Jul 2011, 11:29
- BBCodes: 34
- Favourite MOD: Ban button
- Location: Down south!
Undefined index: HTTP_USER_AGENT
This seems to have done it so far viewtopic.php?f=43&p=15540#p15539
-
- Site Admin
- Posts: 3536
- Joined: 12 May 2008, 21:26
- BBCodes: 239
- Favourite BBCode: Anipro
- Favourite MOD: PrettyPhoto
- Location: Denmark
Undefined index: HTTP_USER_AGENT
Then you wont display browser info.martin123456 wrote:The error has come bk but i think i just found the fix so it's being tested.
find and removefind and removeCode: Select all
$browser = $_SERVER['HTTP_USER_AGENT'];
seems to have done it and the mod is still working as it should so far fingers crossed.Code: Select all
'USER_BROWSER' => $browser,
Im using this atm
Code: Select all
$browser = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
Board rules! No PM support
-
- BBCoder VI
- Posts: 765
- Joined: 25 Jul 2011, 11:29
- BBCodes: 34
- Favourite MOD: Ban button
- Location: Down south!
Undefined index: HTTP_USER_AGENT
did not notice that so trying yours out.
-
- BBCoder VI
- Posts: 765
- Joined: 25 Jul 2011, 11:29
- BBCodes: 34
- Favourite MOD: Ban button
- Location: Down south!
Undefined index: HTTP_USER_AGENT
I'm now using this and it shows ip and browser in the 404 also no error's in the acp at all.
i noticed your does not show the browser ? the code above will show both
Code: Select all
<?php
/**
*
* @package phpBB3
* @version $Id: error.php,v 1.0 2011/05/31 15:49:44 stoker Exp $
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('mods/error');
// Get the avatar
if (!function_exists('get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
$base_url = generate_board_url() . '/';
$ip = $_SERVER['REMOTE_ADDR'];
$browser = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
$mode = request_var('mode', '');
switch ($mode)
{
case '400':
page_header($user->lang['ERROR_TITLE400']);
$template->set_filenames(array(
'body' => 'error/400_body.html')
);
break;
case '401':
page_header($user->lang['ERROR_TITLE401']);
$template->set_filenames(array(
'body' => 'error/401_body.html')
);
break;
case '403':
page_header($user->lang['ERROR_TITLE403']);
$template->set_filenames(array(
'body' => 'error/403_body.html')
);
break;
case '404':
page_header($user->lang['ERROR_TITLE404']);
$template->set_filenames(array(
'body' => 'error/404_body.html')
);
break;
case '500':
page_header($user->lang['ERROR_TITLE500']);
$template->set_filenames(array(
'body' => 'error/500_body.html')
);
break;
}
$template->assign_vars(array(
'S_ERROR_PAGE' => true,
'U_FORUM_BASE' => $base_url,
'USER_AVATAR' => get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']),
'USERNAME' => get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']),
'USER_IP' => $ip,
'USER_BROWSER' => $browser,
));
page_footer();
?>
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 3536
- Joined: 12 May 2008, 21:26
- BBCodes: 239
- Favourite BBCode: Anipro
- Favourite MOD: PrettyPhoto
- Location: Denmark
Undefined index: HTTP_USER_AGENT
I made a mistake last time I closed Fielzilla
But yes, it works with the code from here: viewtopic.php?f=43&t=2387&p=15545#p15542
But yes, it works with the code from here: viewtopic.php?f=43&t=2387&p=15545#p15542
Board rules! No PM support
-
- BBCoder VI
- Posts: 765
- Joined: 25 Jul 2011, 11:29
- BBCodes: 34
- Favourite MOD: Ban button
- Location: Down south!
Undefined index: HTTP_USER_AGENT
nubStoker wrote:I made a mistake last time I closed Fielzilla