Author Topic: Trouble upgrading from really old versions of Website Baker  (Read 340 times)

Offline kristenannie

  • Posts: 7
Trouble upgrading from really old versions of Website Baker
« on: February 04, 2020, 09:17:05 PM »
Hi all,
I have two sites using extremely outdated versions of Website Baker that I need to upgrade to 2.8.12.

One site was running 2.8.2 and one was running 2.8.1. I got both of these sites up to 2.8.3 and then tried to make the leap to 2.8.12.

Sites are showing blank page and I am getting error message:

[Tue Feb 04 11:58:23.834557 2020] [:error] [pid 27049] [client 204.48.245.192:52703] PHP Fatal error:  require_once(): Failed opening required 'WB_PATH/framework/initialize.php' (include_path='.:/usr/share/php') in /var/www/website_baker_sites/web/config.php on line 14

Here are stats for server this is running on:

PHP 7
Mysql 5.7
Apache/2.4.18

Any ideas for troubleshooting this?

Thanks so much for the help!

-Kristen

Offline hgs

  • Betatester
  • **
  • Posts: 1276
    • EFG MG
Re: Trouble upgrading from really old versions of Website Baker
« Reply #1 on: February 05, 2020, 07:48:13 AM »
Ich hoffe du hast, wie emfohlen, ein Backup von der Dantenbank und der Webseite gemacht.

Zum Fehler kann ich leider nicht so viel sagen.
Aber ein paar Fragen:
1. Haben die zwei Seiten nach upgrade auf WB 2.8.3 funktioniert?
2. Wie hast du das upgrade auf WB 2.12.2 gemacht?

Ein Link zu den zwei Seiten kann für die Helfer hilfreich sein.

DeepL:
I hope you have made a backup of the database and the website as recommended.

Unfortunately I can't say too much about the mistake.
But a few questions:
1. did the two sites work after upgrade to WB 2.8.3?
2. how did you upgrade to WB 2.12.2?

A link to the two pages can be helpful for the helpers.
LG Harald

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

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3055
  • Gender: Female
Re: Trouble upgrading from really old versions of Website Baker
« Reply #2 on: February 05, 2020, 08:41:27 AM »
[Tue Feb 04 11:58:23.834557 2020] [:error] [pid 27049] [client 204.48.245.192:52703] PHP Fatal error:  require_once(): Failed opening required 'WB_PATH/framework/initialize.php' (include_path='.:/usr/share/php') in /var/www/website_baker_sites/web/config.php on line 14
Die Fehlermeldung besagt nichts anderes, als dass in der config.php in Zeile 14 die Datei "WB_PATH/framework/initialize.php" nicht geöffnet werden kann. Geht ja auch nicht, da es keinen Pfad "WB_PATH/framework..." gibt.  Der Fehler ist vermutlich entstanden, weil das Upgrade-script die config.php nicht aktualisiert hat. (keine Rechte?).
Die Konstante "WB_PATH" darf an der Stelle noch gar nicht existieren, da sie erst in der initialize.php automatisch definiert wird.

Schnelllösung:  Zeile 14 der config.php ersetzen durch:
require_once __DIR__ '/framework/initialize.php';

The error message says nothing more than: 'WB_PATH / framework / initialize.php' cannot be opened in line 14 of config.php.
That's not possible, because there is no path 'WB_PATH / framework ...'.
The error was probably caused by the upgrade script not updating config.php. (readonly?).
The constant 'WB_PATH' must not exist at this point because it is only automatically defined in the initialize.php.

Quick solution: replace line 14 of config.php with:
 require_once __DIR__ .  '/framework/initialize.php';

Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"You have to take the men as they are… but you can not leave them like that !" :-P
Das tägliche Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

Offline kristenannie

  • Posts: 7
Re: Trouble upgrading from really old versions of Website Baker
« Reply #3 on: February 05, 2020, 05:55:22 PM »
Hi DarkViper,
Thanks for the suggestions.

I looked in config.php and this is what I saw:

?php

define('DB_TYPE', 'mysql');
define('DB_HOST', 'localhost:3306');
define('DB_PORT',         '3306');
define('DB_NAME', 'something');
define('DB_USERNAME', 'something');
define('DB_PASSWORD', 'something');
define('DB_CHARSET',      'utf8_unicode_ci');
define('TABLE_PREFIX', '');

define('WB_URL',          'http://204.48.247.31/web'); // no trailing slash or backslash!!
define('ADMIN_DIRECTORY', 'admin'); // no leading/trailing slash or backslash!! A simple directory name only!!
require_once(WB_PATH.'/framework/initialize.php');


require __DIR__.'/framework/initialize.php';
// --- end of file ----------------------------------


?>

I changed it to this:

?php

define('DB_TYPE', 'mysql');
define('DB_HOST', 'localhost:3306');
define('DB_PORT',         '3306');
define('DB_NAME', 'something');
define('DB_USERNAME', 'something');
define('DB_PASSWORD', 'something');
define('DB_CHARSET',      'utf8_unicode_ci');
define('TABLE_PREFIX', '');

define('WB_URL',          'http://204.48.247.31/web'); // no trailing slash or backslash!!
define('ADMIN_DIRECTORY', 'admin'); // no leading/trailing slash or backslash!! A simple directory name only!!

require_once __DIR__ .  '/framework/initialize.php';

// --- end of file ----------------------------------


?>



Now when I re-load site I get this message on the screen:

There was an uncatched exception
missing template file maintenance.htt
in line (808) of (/framework/class.wb.php):

If you have any ideas, I would love to hear them.

Thanks so much,
Kristen







Offline kristenannie

  • Posts: 7
Re: Trouble upgrading from really old versions of Website Baker
« Reply #4 on: February 05, 2020, 06:00:21 PM »
hgs - yes, I have backups. The sites worked after the upgrade to 2.8.3. It was when I tried to make the jump to 2.8.12 that I was getting a blank screen and errors in the Apache log.

Our organization restricts traffic to US only so unfortunately I don't think the links will work if I post them (I am assuming you are in Germany or somewhere in Europe—sorry if that is a bad assumption).

-Kristen