News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Multiline Maintenance Comment on Upgrade breaks upgrade

Started by Kissaki, June 07, 2012, 11:57:41 AM

Previous topic - Next topic

Kissaki

I tried upgrading from recent 1.1.16 to SMF 2.0.2 via webinstall.
When in the upgrade script, leaving enabling maintenance checked I clicked customize to customize the maintenance description message. I entered a Text consisting of 3 lines.
Trying to start the upgrade, I got internal server errors and syntax errors in my PHP log.
Checking the Settings.php file the multi-line maintenance comment was written to the script file as a single-quoted string, the newlines not escaped, introducing syntax errors.

Fixing those (removing the newlines) I could continue with the upgrade until Step 51  (url param) / Executing: "Adjusting group types." (41 of 42 - of this script), where it times out.
On the first time-out it seems to have copied over the Settings_bak.php to Settings.php introducing the syntax error again. Fixing it in both files still leads to timeout - not sure (yet) if still a result of this issue or a separate issue.
(Update: It was actually my php-fcgi that crashed on that step, hence further AJAX-tries failed with gateway timeouts. Starting upgrade.php again, with the fixed Settings files, it worked.)

To fix this, the newlines being entered as the maintenance description should probably be escaped before saving to the settings file!?

emanuele

Thanks Kissaki for the report!

Will take a look sooner (unless someone else wants to have the fun! :P).


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

ziycon

Looks to be resolved in 2.1 upgrade utility, tested an upgrade from 1.1.19 and 2.0.6 to 2.1 alpha, no issue found when multi-line maintenance messages used.

Advertisement: