Advertisement:

Author Topic: Fatal Error: ~Load.php on line 142  (Read 1077 times)

Offline dgryder

  • Semi-Newbie
  • *
  • Posts: 17
Fatal Error: ~Load.php on line 142
« 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?

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 47,297
Re: Fatal Error: ~Load.php on line 142
« Reply #1 on: July 13, 2017, 03:50:05 PM »
upgrade to php 5.4 or higher, talk to your host.

Offline dgryder

  • Semi-Newbie
  • *
  • Posts: 17
Re: Fatal Error: ~Load.php on line 142
« Reply #2 on: July 13, 2017, 04:02:00 PM »
will updating the php affect my other sites?

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 47,297
Re: Fatal Error: ~Load.php on line 142
« Reply #3 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.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 6,524
  • Too long in the wasteland
Re: Fatal Error: ~Load.php on line 142
« Reply #4 on: July 13, 2017, 04:16:42 PM »
Don't go higher than 5.6, you should be ok.

Offline Colin

  • Lead Developer
  • SMF Hero
  • *
  • Posts: 7,686
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: Fatal Error: ~Load.php on line 142
« Reply #5 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.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline dgryder

  • Semi-Newbie
  • *
  • Posts: 17
Re: Fatal Error: ~Load.php on line 142
« Reply #6 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.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 6,524
  • Too long in the wasteland
Re: Fatal Error: ~Load.php on line 142
« Reply #7 on: July 13, 2017, 05:16:06 PM »
Are you running a theme other than Curve?

Offline dgryder

  • Semi-Newbie
  • *
  • Posts: 17
Re: Fatal Error: ~Load.php on line 142
« Reply #8 on: July 14, 2017, 09:38:51 AM »
yes. it is Carbon Red

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 6,524
  • Too long in the wasteland
Re: Fatal Error: ~Load.php on line 142
« Reply #9 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>';


Offline dgryder

  • Semi-Newbie
  • *
  • Posts: 17
Re: Fatal Error: ~Load.php on line 142
« Reply #10 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

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 6,524
  • Too long in the wasteland
Re: Fatal Error: ~Load.php on line 142
« Reply #11 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. 

Offline dgryder

  • Semi-Newbie
  • *
  • Posts: 17
Re: Fatal Error: ~Load.php on line 142
« Reply #12 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.

Offline BryanD

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,008
  • Gender: Male
    • BryanRunicDeakin on Facebook
    • @bryandeakin on Twitter
    • Bryan Deakin dot Com
Re: Fatal Error: ~Load.php on line 142
« Reply #13 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

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 47,297
Re: Fatal Error: ~Load.php on line 142
« Reply #14 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.

Offline BryanD

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,008
  • Gender: Male
    • BryanRunicDeakin on Facebook
    • @bryandeakin on Twitter
    • Bryan Deakin dot Com
Re: Fatal Error: ~Load.php on line 142
« Reply #15 on: July 16, 2017, 11:29:06 AM »
Actually it makes no difference!

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 6,524
  • Too long in the wasteland
Re: Fatal Error: ~Load.php on line 142
« Reply #16 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.

Offline dgryder

  • Semi-Newbie
  • *
  • Posts: 17
Re: Fatal Error: ~Load.php on line 142
« Reply #17 on: July 17, 2017, 09:53:18 AM »
here is the index.template.php as it is currently

Offline dgryder

  • Semi-Newbie
  • *
  • Posts: 17
Re: Fatal Error: ~Load.php on line 142
« Reply #18 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

Offline dgryder

  • Semi-Newbie
  • *
  • Posts: 17
Re: Fatal Error: ~Load.php on line 142
« Reply #19 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?