WebsiteBaker Support (2.13.x) > General Help & Support
Update does not work.
CodeALot:
WebsiteBaker 2.13.6 r237, upgrading from 2.13.2 r133
PHP 8.3.14
Update script stops with error 500.
Config.php is overwritten, all database values are empty.
Repaired the config.php, site is still not working, is loading forever.
Site is dead.
The online line mentioning the upgrade_script in my error-log is this (this occured while trying to do the upgrade)
--- Code: ---[Wed Jan 15 12:04:30.985225 2025] [proxy_fcgi:error] [pid 2047144:tid 140136894924544] [client 2001:1c04:1317:6d00:] AH01071:
Got error 'PHP message: PHP Fatal error: Uncaught Error: Undefined constant "WB_URL"
in /var/www/vhosts/MYDOMAIN.nl/httpdocs/install/upgrade-script.php:277\nStack trace:\n#0 {main}\n
thrown in /var/www/vhosts/MYDOMAIN.nl/httpdocs/install/upgrade-script.php on line 277', referer: https://www.MYDOMAIN.nl/install/upgrade-script.php?
--- End code ---
So: backup restored, I'll wait for an update, I guess.
sternchen8875:
same problem was reported from a user/supporter from switzerland. i think, the problem was there: a missing file write permission (chmod444 instead of chmod644) for the config.php, but not possible to say with garanty from my place. If i look into the function to rewrite the config-file, i see only 3 possible errors.
#1: the upgrade-script didn't read the "old" config.php,
#2: the permissions for the config.php and
#3: write permission for a temporary file unter /temp, called ~config
to #1
file_get_contents() is the savest method to read the content. The config.php must be there, otherwhise WB doesn't work. the function works with the minimal read-permission for the config, from my point, i see no option for a empty result of file_get_contents()
to #2
protect the index.php and the config.php in WB-Root-Folder with chmod444 was a tip in the past here in the forum.
The upgrad-script check the write_permissions with \is_writable() and set an error in the error.log and exit the script, before anything happend
P.S.: if somebody use the method with chmod444, please remember, that the server use a intern cache for this and sometime, it needs a couple of minutes to see the new chmod-value
to #3
WB check the write permission for the /temp-Folder in every step, because, it need this folder for the translation-cache. WB stops immediately, if there is a problem with this folder
since the last wb-version in december 2023 every tester makes hundred of upgrade and nobody has change the upgrade script in this part of code and i cannot remember, that we get some reports like this in the past. the method, to rewrite the config.php is nearly the same like WB 2.10
i 've to say (and sorry for that): i dont know, whats happend :|
the way is simple: read the old config, write it into a temporary file with some changes (if needed), include this content from the temporary file and set the values for the new file - and here is the problem
Last step: write the new content into the original config.php
Only solution (at the moment) - fill the config with the missing datas from a backup and start the upgrade-script again
I've some question about this
1. the first (crashed) Upgrade - do you start it from the backend and if YES, from the link with the redirect or from the info-windows (link in the last line)
2. do you the the white screen with the message "Restart Program (or press F5)"?
CodeALot:
--- Quote ---I've some question about this
1. the first (crashed) Upgrade - do you start it from the backend and if YES, from the link with the redirect or from the info-windows (link in the last line)
2. do you the the white screen with the message "Restart Program (or press F5)"?
--- End quote ---
I got it to work and here's how I did it: (read below for remaining errors)
* Changed the config.php to 0444
* Unpacked the ZIP file using the filemanager from my hoster, overwriting all existing files
* Opened /admin
* Got the line "upgrade script could not start automatically - Please click on this link to start the script" - Clicked
* Got ERROR 500
* Changed config.php to 0644
* Pressed F5 to restart the upgrade_script.php
* Got the white screen that said "Update file [config.php] successfully completed!"
* Checked the contents of conffig.php - they were untouched.
* Pressed the button "Restart program (or press F5)"
* Update completed.
WB Info (from the admin screen) now reports new version "WebsiteBaker-Version: 2.13.6 -r237 - Last cumulative update-revision: R237 - (04-12-2024 11:08:47)"
I noticed a new error when accessing the WysiwygAdmin (from the admin screen), it triggers this error in the log
--- Code: ---Wed, 15 Jan 2025 14:44:20 +0000 [E_DEPRECATED] /modules/wysiwyg_admin/driver/c_wysiwyg_driver.php:[73]
from /modules/wysiwyg_admin/driver/ckeditor/c_editor.php:[3] require_once "Optional parameter $what
declared before required parameter $aSelected is implicitly treated as a required parameter""
--- End code ---
(I believe that's an outdated tool. Never mind that error)
sternchen8875:
a difficult theme (for me)...
the upgradescript use the try && catch-method. try means: start the check für the new config, check charset && WB-Version from the old config, if needed, replace it with the new values from admin/interface/version.php , then write a temporary file in /temp-folder with the new content and rewrite the new config
catch means: if you get an error in the try-part, do this, in our case, display the F5-Restart-Message.
But nobody knows, what kind of error happend in the try-part. The problem must be somewhere between "build the temporary file" and "set the new values from this file"
in the step before, the upgrade-script check, that the config is writable. IF NOT, it stops normalize with a message
--- Quote ---The file [config.php] is not writable and can not be corrected!
Please grant the necessary rights to the file and restart this program!
--- End quote ---
i know, the order inside of the upgrade-script.php is wrong for the case of a unwritable config.php - and maybe, thats also the secret, but we've to test it first.
--- Quote ---Wed, 15 Jan 2025 14:44:20 +0000 [E_DEPRECATED] /modules/wysiwyg_admin/driver/c_wysiwyg_driver.php:[73]
--- End quote ---
change the order here in line 73 of the file /modules/wysiwyg_admin/driver/c_wysiwyg_driver.php
from (original code)
--- Code: ---public function build_select( $what="skins", $aName, $aSelected, $aOptions=array() ) {
--- End code ---
to
--- Code: ---public function build_select( $aName, $aSelected, $what="skins", $aOptions=array() ) {
--- End code ---
$what have the right place behind the required parameter, here $aSelected
sternchen8875:
a question, my friend...
we talk about the wysiwyg-admin-module. do you use a own module or my latest version 0.1.9.4-dev2 ??
Navigation
[0] Message Index
[#] Next page
Go to full version