think i've cracked it!  i'm using a jumpbox which is set to use dhtp so i set it to static network settings.  seems ot have sorted it.  thanks for your help anyway wink

smartys - can you copy in the paragraph in the admin-options.php file that has the base url?

i havnt modified any code at all. its all vanilla.  the backups are set to run so i'll take that off and see if it helps.  the IP has changed again since i corrected it last night.  i can guarnatee no-one else is changing it as i've put a rule on the fw saying only i can access it. 

can one of you guys check my admin options file i posted above?  i dont have the ip in there?  maybe i've go a line missing?  really appreciate your help on this!

cheers

nope.  i'm the only one with access.  i've even checked my firewall logs.  this is happening even with no-one accessing the forum but me.  it must be picking it up from somehwere.

this is part of the admin file:

--------
if (isset($_POST['form_sent']))
{
    // Custom referrer check (so we can output a custom error message)
    if (!preg_match('#^'.preg_quote(str_replace('www.', '', $pun_config['o_base_url']).'/admin_options.php', '#').'#i', str_replace('www.', '', (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''))))
        message('Bad HTTP_REFERER. If you have moved these forums from one location to another or switched domains, you need to update the Base URL manually in the database (look for o_base_url in the config table) and then clear the cache by deleting all .php files in the /cache directory.');

    $form = array_map('trim', $_POST['form']);

    if ($form['board_title'] == '')
        message('You must enter a board title.');

    // Clean default_lang
    $form['default_lang'] = preg_replace('#[\.\\\/]#', '', $form['default_lang']);

    require PUN_ROOT.'include/email.php';

    $form['admin_email'] = strtolower($form['admin_email']);
    if (!is_valid_email($form['admin_email']))
        message('The admin e-mail address you entered is invalid.');

    $form['webmaster_email'] = strtolower($form['webmaster_email']);
    if (!is_valid_email($form['webmaster_email']))
        message('The webmaster e-mail address you entered is invalid.');

    if ($form['mailing_list'] != '')
        $form['mailing_list'] = strtolower(preg_replace('/[\s]/', '', $form['mailing_list']));

    // Make sure base_url doesn't end with a slash
    if (substr($form['base_url'], -1) == '/')
        $form['base_url'] = substr($form['base_url'], 0, -1);

    // Clean avatars_dir
    $form['avatars_dir'] = str_replace("\0", '', $form['avatars_dir']);

    // Make sure avatars_dir doesn't end with a slash
    if (substr($form['avatars_dir'], -1) == '/')
        $form['avatars_dir'] = substr($form['avatars_dir'], 0, -1);

    if ($form['additional_navlinks'] != '')
        $form['additional_navlinks'] = trim(pun_linebreaks($form['additional_navlinks']));

    if ($form['announcement_message'] != '')
        $form['announcement_message'] = pun_linebreaks($form['announcement_message']);
    else
    {
        $form['announcement_message'] = 'Enter your announcement here.';

        if ($form['announcement'] == '1')
            $form['announcement'] = '0';
    }

    if ($form['rules_message'] != '')
        $form['rules_message'] = pun_linebreaks($form['rules_message']);
    else
    {
        $form['rules_message'] = 'Enter your rules here.';

        if ($form['rules'] == '1')
            $form['rules'] = '0';
    }

    if ($form['maintenance_message'] != '')
        $form['maintenance_message'] = pun_linebreaks($form['maintenance_message']);
    else
    {
        $form['maintenance_message'] = 'The forums are temporarily down for maintenance. Please try again in a few minutes.\n\n/Administrator';

        if ($form['maintenance'] == '1')
            $form['maintenance'] = '0';
    }

    $form['timeout_visit'] = intval($form['timeout_visit']);
    $form['timeout_online'] = intval($form['timeout_online']);
    $form['redirect_delay'] = intval($form['redirect_delay']);
    $form['topic_review'] = intval($form['topic_review']);
    $form['disp_topics_default'] = intval($form['disp_topics_default']);
    $form['disp_posts_default'] = intval($form['disp_posts_default']);
    $form['indent_num_spaces'] = intval($form['indent_num_spaces']);
    $form['avatars_width'] = intval($form['avatars_width']);
    $form['avatars_height'] = intval($form['avatars_height']);
    $form['avatars_size'] = intval($form['avatars_size']);

    if ($form['timeout_online'] >= $form['timeout_visit'])
        message('The value of "Timeout online" must be smaller than the value of "Timeout visit".');

    while (list($key, $input) = @each($form))
    {
        // Only update values that have changed
        if (array_key_exists('o_'.$key, $pun_config) && $pun_config['o_'.$key] != $input)
        {
            if ($input != '' || is_int($input))
                $value = '\''.$db->escape($input).'\'';
            else
                $value = 'NULL';

            $db->query('UPDATE '.$db->prefix.'config SET conf_value='.$value.' WHERE conf_name=\'o_'.$db->escape($key).'\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
        }
    }

    // Regenerate the config cache
    require_once PUN_ROOT.'include/cache.php';
    generate_config_cache();

    redirect('admin_options.php', 'Options updated. Redirecting …');
}


$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Options';
$form_name = 'update_options';
require PUN_ROOT.'header.php';
---------

i've just realized if i ssl into onto the box and open up the admin options file - i cant see either ip address?  if i look at the GUI though the ip address is there.  do you know what the paragraph is that holds the base url in the admin options file?

i'm the only admin.  its a vanilla system - i havnt made any changes.  thanks for the help!

no idea how its happening.  it literally works for a few days then starts handing out the internal IP again.  i've tried cleaning the cache once i change it back but it still happens.  how do i look to see if there isa "cron job" (no idea what that is wink

just a quick addition - its my base url that is changing automatically on its own.

hi

i hope someone can help with this as i've not been able to figure it out.  i've got my forum set up on an internal 192.168 network.  i have a static external IP address though and my forum is acessible externally.  in order for people to subscribe to topics i have changed the IP address in the admin options ot my external 87.x.x.x ip address so because that is the ip address that is handed out in the subscribtion email sent out by the forum.  on my router i've set a rule that says any traffic inbound must be sent to my internal 192.x.x.x ip.  everything works fine for awhile.  the problem is that after a few days the IP address in the admin options always "jumps" back to 192.x.x.x/punbb automatically.  i cant understand why it changes on its own?  would really appreciate some help with this!

thanks in advance!

wayne