Init.php file causing 'http error 500'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jimnyc
    Senior Member
    • Aug 2003
    • 191
    • 2.3.0

    [Forum] Init.php file causing 'http error 500'

    The http error 500 started up on my site, no changes made at all by myself. This is vb 4.2.5 forums.

    I'm at the mercy of my host and opened a ticket. They came back with the following errors, and advised that maybe I should download a backup and overwrite that file from the previous day??

    These are the error lines they shared with me. Can anyone offer any further insight? Thanks much in advance!! -Jim

    I just changed the home directory name to ****'s is all.

    [09-Nov-2018 12:07:19 America/Chicago] PHP Parse error: syntax error, unexpected 'Content' (T_STRING) in /home/*****/public_html/includes/init.php on line 722
    [09-Nov-2018 12:07:24 America/Chicago] PHP Parse error: syntax error, unexpected 'Content' (T_STRING) in /home/*****/public_html/includes/init.php on line 722
    [09-Nov-2018 12:07:25 America/Chicago] PHP Parse error: syntax error, unexpected 'Content' (T_STRING) in /home/*****/public_html/includes/init.php on line 722
    [09-Nov-2018 12:07:30 America/Chicago] PHP Parse error: syntax error, unexpected 'Content' (T_STRING) in /home/*****/public_html/includes/init.php on line 722
    .
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73976

    #2
    If all your files are up to date and unmodified, the system is trying to contact Facebook at this point in the cycle and refresh a Facebook Login cookie.

    Code:
            $fbredirect = "
                <!DOCTYPE html>
                <html>
                <head>
                    <script type='text/javascript' src='//connect.facebook.net/en_US/sdk.js'></script>
                    <script type='text/javascript'>
                        FB.init({
                            appId : '{$vbulletin->options['facebookappid']}',
                            version : 'v2.2',
                            status : false,
                            cookie : true,
                            xfbml : false
                        });
                        FB.getLoginStatus(function(response)
                        {
                            window.top.location.reload(true);
                        });
                    </script>
                </head>
                <body></body>
                </html>
            ";
    Line 722 is the <head> element in that string. If your file has something different, we would need to see the code. Make sure you're using vBulletin 4.2.5 files first though.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • jimnyc
      Senior Member
      • Aug 2003
      • 191
      • 2.3.0

      #3
      Here is what mine has for that same section:

      $fbredirect = "
      <!DOCTYPE html>
      <html>
      <head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
      <script type='text/javascript' src='//connect.facebook.net/en_US/sdk.js'></script>
      <script type='text/javascript'>
      FB.init({
      appId : '{$vbulletin->options['facebookappid']}',
      version : 'v2.2',
      status : false,
      cookie : true,
      xfbml : false
      });

      FB.getLoginStatus(function(response)
      {
      window.top.location.reload(true);
      });
      </script>
      </head>
      <body></body>
      </html>
      .

      Comment

      • jimnyc
        Senior Member
        • Aug 2003
        • 191
        • 2.3.0

        #4
        Wayne,

        I just re-uploaded the original init.php file from the 4.2.5 download, and now all appears to be just fine. Is that OK to have reuploaded that older file as such?

        Thanks much!!
        .

        Comment

        • Wayne Luke
          vBulletin Technical Support Lead
          • Aug 2000
          • 73976

          #5
          The PHP files shouldn't change since they were released so you can overwrite them from the download package. However, from time to time, files do get altered through hardware glitches, software glitches, and even some tools used by ISPs.
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...