PHP Help

arsonistx

New Member
Messages
308
Reaction score
0
Points
0
Hello, I just installed my Invision Power Board and when I try to log into the admin control panel, I get an error. The login part still shows and when I click log in, it logs me in and then redirects me right back to the login screen.

Here is the error I'm getting and the part of the code that it corresponds to. Line 1440 is in bold.:

error:
Code:
[B]Warning[/B]:  strstr() [[URL="http://arsonistx.exofire.net/admin/function.strstr"]function.strstr[/URL]]: Empty delimiter. in [B]/home/arsonist/public_html/sources/lib/admin_functions.php[/B] on line [B]1440[/B]

php code:
Code:
        if( !$url )
        {
            $url = '&';
        }
        
[B]        if ( ! strstr( $url, $this->ipsclass->vars['board_url'] ) )[/B]
        {
            $url = $this->ipsclass->base_url.'&'.$url;
        }
        
        if ( $this->ipsclass->main_msg )
        {
            if( strlen($this->ipsclass->main_msg) > 1500 )
            {
                $this->ipsclass->main_msg = substr( $this->ipsclass->main_msg, 0, 1500 );
            }
            
            $url .= '&messageinabottleacp='.urlencode( $this->ipsclass->main_msg );
        }
        
        $this->ipsclass->main_msg   = "";
        $this->ipsclass->html_title = "IPB: ACP: Redirecting...";
    
        $html = $this->ipsclass->skin_acp_global->global_redirect( $url, $time, $text );
        
        $this->ipsclass->html = str_replace( '<%CONTENT%>', $html, $this->ipsclass->skin_acp_global->global_main_wrapper() );
        $this->ipsclass->html = str_replace( '<%TITLE%>'  , $this->ipsclass->html_title, $this->ipsclass->html );
        $this->ipsclass->html = str_replace( "<body", "<body style='background-image:url({$this->ipsclass->skin_acp_url}/images/blank.gif)'", $this->ipsclass->html );
        
        @header("Content-type: text/html; charset={$this->ipsclass->vars['gb_char_set']}");
        print $this->ipsclass->html;
        exit();
    }

I'm not very good with PHP, so if anybody could help it would be greatly appreciated.
 
Last edited:

flinx

New Member
Messages
68
Reaction score
0
Points
0
It should mean that $this->ipsclass->vars['board_url'] is empty. Why it's empty? I don't know.
 

arsonistx

New Member
Messages
308
Reaction score
0
Points
0
Do you think it could have something to do with my version of PHP?
I've just upgraded to the Intermediate PHP Config in Ad-Enhanced hosting.

I have no clue why else it isn't working...
 

arsonistx

New Member
Messages
308
Reaction score
0
Points
0
I'm not sure, where do I do that? =/



Edit:
Well, I just figured something out. When I log into the admin control panel, and it redirects me back to the login page. I looked at the URL and this is what it was:

Code:
http://sitename.exofire.net/admin/index.php?adsess=&/admin/index.php?adsess=b80dd499695064af57a068f458f9c39b&old_adsess=&admin/index.php?old_&old_old_adsess=&/admin/index.php?old_&old_old_old_adsess=&/admin/index.php?old_&&member_id=1&password=ok&member_id=1&password=ok&member_id=1&password=ok&member_id=1&password=ok

It should have just been:
Code:
http://sitename.exofire.net/admin/index.php?adsess=b80dd499695064af57a068f458f9c39b&old_adsess=&admin/index.php?old_&old_old_adsess=&/admin/index.php?old_&old_old_old_adsess=&/admin/index.php?old_&&member_id=1&password=ok&member_id=1&password=ok&member_id=1&password=ok&member_id=1&password=ok

There is an extra "/admin/index.php?adsess=&" in the URL.
Does anyone have any idea why it is placing two of those in the URL?

By the way, I went to the second URL, without the extra bit in it, and it brought me into the admin control panel just fine.
 
Last edited:
Top