Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: dgryder on July 13, 2017, 03:48:27 PM

Title: Fatal Error: ~Load.php on line 142
Post by: dgryder on July 13, 2017, 03:48:27 PM
Upgraded to 2.0.14 and now my site will not open but gives this error

Fatal Error: ~Load.php on line 142

How can I get the forum back?
Title: Re: Fatal Error: ~Load.php on line 142
Post by: Illori on July 13, 2017, 03:50:05 PM
upgrade to php 5.4 or higher, talk to your host.
Title: Re: Fatal Error: ~Load.php on line 142
Post by: dgryder on July 13, 2017, 04:02:00 PM
will updating the php affect my other sites?
Title: Re: Fatal Error: ~Load.php on line 142
Post by: Illori on July 13, 2017, 04:14:04 PM
i cant tell you that as we dont know what else you are running and what their requirements are.
Title: Re: Fatal Error: ~Load.php on line 142
Post by: Sir Osis of Liver on July 13, 2017, 04:16:42 PM
Don't go higher than 5.6, you should be ok.
Title: Re: Fatal Error: ~Load.php on line 142
Post by: Colin on July 13, 2017, 04:47:02 PM
Rather than taking the break first try later, which is totally fine if you don't mind things going down for a bit, have a look at the PHP version requirements of the other applications you are running.
Title: Re: Fatal Error: ~Load.php on line 142
Post by: dgryder on July 13, 2017, 05:10:21 PM
I upgraded to php 5.4 and was able to get the login page to open

Everytime I login I immediately get this:

An Error Has Occurred!
Your session timed out while posting. Please go back and try again.
Title: Re: Fatal Error: ~Load.php on line 142
Post by: Sir Osis of Liver on July 13, 2017, 05:16:06 PM
Are you running a theme other than Curve?
Title: Re: Fatal Error: ~Load.php on line 142
Post by: dgryder on July 14, 2017, 09:38:51 AM
yes. it is Carbon Red
Title: Re: Fatal Error: ~Load.php on line 142
Post by: Sir Osis of Liver on July 14, 2017, 01:25:29 PM
index.template.php

Find this -

Code: [Select]

echo '
<input type="hidden" name="hash_passwrd" value="" />
</form>';



Change it to this -

Code: [Select]

echo '
<input type="hidden" name="hash_passwrd" value="" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
</form>';

Title: Re: Fatal Error: ~Load.php on line 142
Post by: dgryder on July 15, 2017, 10:40:47 AM
I appreciate your assistance. I changed the index.template.php in the CarbonRed theme and it still did the same result:

An Error Has Occurred!
Your session timed out while posting. Please go back and try again.


In the URL it has this: ~index.php?action=login2
Title: Re: Fatal Error: ~Load.php on line 142
Post by: Sir Osis of Liver on July 15, 2017, 04:02:40 PM
If you did the edit correctly, it should work.  In CarbonRed it should look like this -

Code: [Select]

echo '<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user"  size="10" class="input_text" />
<input type="password" name="passwrd"  size="10" class="input_password" />
<input type="submit" value="', $txt['login'], '" class="button_submit" />
<input type="hidden" name="hash_passwrd" value="" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
</form>', $context['current_time'],'<br />';
  }


If code is correct, try Curve theme.  If problem persists, you'll have to disable session check to fix it. 
Title: Re: Fatal Error: ~Load.php on line 142
Post by: dgryder on July 15, 2017, 11:56:45 PM
This is what the code looks like:

      echo '<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
      <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
            <input type="text" name="user"  size="10" class="input_text" />
            <input type="password" name="passwrd"  size="10" class="input_password" />
            <input type="submit" value="', $txt['login'], '" class="button_submit" />
            <input type="hidden" name="hash_passwrd" value="" />
            <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
         </form>', $context['current_time'],'<br />';
     }

I tried pasting your code in and it would not even open the login page.

I don't know how to change the theme to Curve without being able to login.
Title: Re: Fatal Error: ~Load.php on line 142
Post by: BryanD on July 16, 2017, 05:04:35 AM
Go to your site and after when your on a page type in index.php?theme=01

For example http://www.examplesite.com/forum/index.php?theme=01
Title: Re: Fatal Error: ~Load.php on line 142
Post by: Illori on July 16, 2017, 06:00:39 AM
Go to your site and after when your on a page type in index.php?theme=01

For example http://www.examplesite.com/forum/index.php?theme=01

actually it is
http://www.examplesite.com/forum/index.php?theme=1 not 01, as curve is the number 1 theme.
Title: Re: Fatal Error: ~Load.php on line 142
Post by: BryanD on July 16, 2017, 11:29:06 AM
Actually it makes no difference!
Title: Re: Fatal Error: ~Load.php on line 142
Post by: Sir Osis of Liver on July 16, 2017, 10:24:44 PM
The code I posted works fine in CarbonRed in 2.0.14.  Attach your index.template.php.
Title: Re: Fatal Error: ~Load.php on line 142
Post by: dgryder on July 17, 2017, 09:53:18 AM
here is the index.template.php as it is currently
Title: Re: Fatal Error: ~Load.php on line 142
Post by: dgryder on July 17, 2017, 09:59:00 AM
BryanD, I get the exact same results if I try to login with ~index.php?theme=01
Title: Re: Fatal Error: ~Load.php on line 142
Post by: dgryder on July 17, 2017, 10:11:05 AM
I got in to the forum by using repair.settings.php

Now I will try to make sure the smf is up to date

Is there something I need to fix before switching to CarbonRed?
Title: Re: Fatal Error: ~Load.php on line 142
Post by: dgryder on July 17, 2017, 10:38:28 AM
If i reset to Carbon Red, then it fails again

How do I get Carbon Red to work again?
Title: Re: Fatal Error: ~Load.php on line 142
Post by: BryanD on July 17, 2017, 11:28:52 AM
attach your index.template.php for your carbon read theme
Title: Re: Fatal Error: ~Load.php on line 142
Post by: Sir Osis of Liver on July 17, 2017, 01:48:28 PM
Don't see anything in your file that should cause a parse error.  Looks like you edited the template in a word processor.  You must use a text editor, and save as plain text.  Try the attached.
Title: Re: Fatal Error: ~Load.php on line 142
Post by: dgryder on July 17, 2017, 01:58:41 PM
BryanD,

The index template that I uploaded was from my CarbonRed theme

Title: Re: Fatal Error: ~Load.php on line 142
Post by: Sir Osis of Liver on July 17, 2017, 02:01:13 PM
Yes, and the file I attached to my previous post is CarbonRed template.  It works fine in that theme, and includes the login fix and your footer edit.
Title: Re: Fatal Error: ~Load.php on line 142
Post by: dgryder on July 17, 2017, 05:36:28 PM
Something else must be wrong other than the index template, because the site does exactly the same thing when I used your template instead of the one that I had.

It does however work with the default theme after I used the repair settings tool
Title: Re: Fatal Error: ~Load.php on line 142
Post by: Sir Osis of Liver on July 17, 2017, 10:26:19 PM
I need to see your site with CarbonRed running.  Link?

On second thought, if Curve runs ok, just uninstall CarbonRed in Admin -> Themes and Layout -> Theme Settings (red X on right), and reinstall it from original zip.  Get it working, then replace index.template.php with the file I gave you.