+ Reply to Thread
Results 1 to 5 of 5

Thread: PHP Help

  1. #1
    arsonistx is offline x10 Lieutenant arsonistx is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    308

    PHP Help

    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:
    Warning:  strstr() [function.strstr]: Empty delimiter. in /home/arsonist/public_html/sources/lib/admin_functions.php on line 1440
    php code:
    Code:
            if( !$url )
            {
                $url = '&';
            }
            
            if ( ! strstr( $url, $this->ipsclass->vars['board_url'] ) )
            {
                $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 by arsonistx; 10-17-2007 at 04:19 PM.

  2. #2
    flinx is offline x10Hosting Member flinx is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    68

    Re: PHP Help

    It should mean that $this->ipsclass->vars['board_url'] is empty. Why it's empty? I don't know.

  3. #3
    arsonistx is offline x10 Lieutenant arsonistx is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    308

    Re: PHP Help

    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...

  4. #4
    Cj555 is offline x10Hosting Member Cj555 is an unknown quantity at this point
    Join Date
    Aug 2007
    Posts
    6

    Re: PHP Help

    have you set the board url?

  5. #5
    arsonistx is offline x10 Lieutenant arsonistx is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    308

    Re: PHP Help

    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 by arsonistx; 10-18-2007 at 04:59 AM. Reason: Automerged Doublepost

+ Reply to Thread

Similar Threads

  1. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  2. tons of PHP Resources
    By Chris S in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 01-16-2009, 10:07 AM
  3. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM
  4. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers