WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • General Help & Support »
  • PHP Fatal error: forgot-form
  • Print
Pages: [1]   Go Down

Author Topic: PHP Fatal error: forgot-form  (Read 9296 times)

Offline Vasiliy

  • Posts: 35
  • Gender: Male
PHP Fatal error: forgot-form
« on: October 17, 2018, 10:25:21 AM »
Hello!

I checked my site and found two more errors:
When prompted to fogot the password.

1. The first mistake. In the forgot_form.htt file
Line number 13
Quote
<form action="{WB_URL}/account/forgot.php" method="post" class="account" autocomplete="off">
Variable value {WB_URL}
not defined in the file forgot_form.php .
Therefore, the wrong path to the form verification file forgot.php is called in the form.
I have Wb located in the subdectoria, and here the root path is called.

The solution is to add a line to the file forgot_form.php
Quote
$template->set_var('WB_URL', WB_URL);
Now the correct path to the form validation file forgot.php is called.

2. The second mistake. It immediately appeared in the file forgot_form.php
Quote
PHP Fatal error:  require_once(): Failed opening required '/public_html/wb-test/framework/PasswordHash.php'
This is the code that causes the error.
Quote
require_once(WB_PATH.'/framework/PasswordHash.php');
                $pwh = new PasswordHash(0, true);
Logged

Offline Vasiliy

  • Posts: 35
  • Gender: Male
Re: PHP Fatal error: forgot-form
« Reply #1 on: October 17, 2018, 03:41:06 PM »
WB-Version 2.12.0
The solution (mistake 2) is to change code in line 73-77 in the file forgot_form.php

Quote
require_once(WB_PATH.'/framework/PasswordHash.php');
$pwh = new PasswordHash(0, true);
$old_pass = $results_array['password'];
 // Generate a random password then update the database with it
 $new_pass = $pwh->NewPassword();
and line 79
Quote
. '`password`=\''.$database->escapeString($pwh->HashPassword($new_pass, true)).'\', '

Code I am copy from file signup2.php
Quote
$old_pass = $results_array['password'];
$new_pass = '';
$salt = "abchefghjkmnpqrstuv wxyz0123456789";
srand((double)microtime()*1000000);
$i = 0;
while ($i <= 7)
{
   $num = rand() % 33;
    $tmp = substr($salt, $num, 1);
    $new_pass = $new_pass . $tmp;
    $i++;
}

// MD5 supplied password
$md5_password = md5($new_pass);
Quote
. '`password`=\''.$database->escapeString($md5_password).'\', '
Now forget the password form work.
Without these changes, the form does not work.
Logged

Offline hgs

  • WebsiteBaker Org e.V.
  • **
  • Posts: 1884
    • EFG MG
Re: PHP Fatal error: forgot-form
« Reply #2 on: October 17, 2018, 04:01:26 PM »
Did they install the fixes from here?
https://addon.WebsiteBaker.org/pages/en/home.php

(Password Fix WB 2.10.0 - 2.12.0)
(Bug-Fixes for WB 2.12.0 stable, We collect reported problems and publish fixes.)
Logged
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

"Never begin to stop - never stop beginning." Marcus Tullius Cicero (106-43 BC)

Offline dbs

  • Betatester
  • **
  • Posts: 8915
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: PHP Fatal error: forgot-form
« Reply #3 on: October 17, 2018, 05:32:15 PM »
Confirmed, if WB is installed in a subdirectory.
Logged
https://onkel-franky.de

Offline hgs

  • WebsiteBaker Org e.V.
  • **
  • Posts: 1884
    • EFG MG
Re: PHP Fatal error: forgot-form
« Reply #4 on: October 17, 2018, 09:49:58 PM »
Yes, the error is detected and fixed. Thanks for the message.
Please download the fix from the addon page
https://addon.WebsiteBaker.org/pages/en/home.php
(Password Fix WB 2.10.0 - 2.12.0) (last changes 17-Oct-18 18:37 GMT)
and test it and give us your feedback.
Thank you
Logged
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

"Never begin to stop - never stop beginning." Marcus Tullius Cicero (106-43 BC)

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • General Help & Support »
  • PHP Fatal error: forgot-form
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2