Firefox PHP

Upgrade from 5.1.19 to 5.2.23

Posted by ajdawson 
Upgrade from 5.1.19 to 5.2.23
October 22, 2018 10:47AM
Hi Everyone,

I'm currently trying to upgrade from Phorum 5.1.9 to 5.2.23 on a hosted website and am seeing issues.

My hosting provider recently upgraded MySQL to MariaDB (latest version AFAIK) and PHP to PHP 7. The old Phorum site on 5.1.19 stopped working and now just shows a blank page when a user attempts to access it. Admin.php also just shows a blank page, which of course means I can no longer administer the forum at all.

It's been a while since I did an upgrade (as you can tell from the version) and I'm struggling to get the upgrade moving. I'm seeing lots of errors during the upgrade process, which eventually crashes and burns.

I initially tried a browser based upgrade, however after following the instructions at [www.phorum.org] when navigating to the forum location I still see a blank page (no prompt to go to the admin page). Trying the admin.php page directly gives header showing the old Phorum version and nothing else.

I've also tried a console upgrade. Having copied the files over the top of the original versions (using FileZilla from a Windows 10 machine) when I try to run 'php console_upgrade.php', the first few upgrades go okay, but then I run into a problem: Upgrading from patch level 2006090701 to 2007042401 (this is step 4 of 45 for this upgrade) 'An error occurred during this upgrade: You have an error in your SQL syntax check the manual that corresponds to your MySQL server version for the right syntax to use near 'ignore table phorum_users drop user_data' at line 1.

If I push on with the upgrade despite this error, at step 7 of 45 (2007042700 to 2007050300) I see another message about SQL syntax: 'ignore table phorum_users add column real_name varchar(255) not null defaul' (yes, there is not 't' on the end of default in this message' and the real_name column is not added to the table. Pressing on again at this point eventually causes the entire upgrade to crash and burn at the next step as it attempts to insert data into the real_name column.

I've tried looking for the commands that are being executed, but have so far failed to decipher where these are being pulled from and cannot therefore correct the commands being used.

Anyone have any suggestions on where I can go from here?

Many thanks
Andy
Re: Upgrade from 5.1.19 to 5.2.23
October 22, 2018 06:12PM
Some hosts allow you to choose your php version in cpanel, or plesk. You may need to create your own php.ini or equivalent to use a down version php

If the above does not work.
Set up php 5.3 or 5.6 on a local machine
Set up mysql 5.015 or something close on a local machine
Set up phorum 5.1.19, Empty the tables created

load the database with a copy of the backup of the database

from the internet archive (wayback machine) find a link to phorum 5.2.16
[web.archive.org]
Try to upgrade.
If successful try to upgrade Phorum to 5.2.23
Re: Upgrade from 5.1.19 to 5.2.23
October 22, 2018 07:16PM
Please also read this thread.

[www.phorum.org]
Re: Upgrade from 5.1.19 to 5.2.23
October 24, 2018 02:52PM
Hi,

Many thanks for the pointers.

My hosting provider appears to only provide PHP 7.2 as an option in cPanel. Adding a php.ini file pointing to 5.6 didn't seem to help and as they specifically state in the cPanel that 7.2 is the only provided version I guess that won't be a route I can take.

I'll have a go with the other options and see how I get on!

Does Phorum 5.2.23 work with PHP 7.2? I've not had time to get a new version setup to try yet unfortunately. Hopefully later this week I may have some time to give that a go to see what happens.

Many thanks
Andy
Re: Upgrade from 5.1.19 to 5.2.23
October 24, 2018 03:56PM
I have seen issues (missing parts of page in the admin) with php7.2 on linux (not my site), yet it appears to work on my local windows machine.

To test, install an all new Phorum 5.2.23 in a different directory, just change the prefix for the phorum tables in the config.


(See the link in my previous message, and read the whole topic.)
You may also have issues due to engine type when loading from a Dump file, due to 'TYPE=MyISAM' being replaced with 'ENGINE=MyISAM'
Problems with importing the data only to newer versions of mysql (and mariaDB), may be caused by NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES being on by default.
Re: Upgrade from 5.1.19 to 5.2.23
June 19, 2024 05:57PM
Not sure whether anyone uses Phorum still, but nevertheless, I've just tried to upgrade and got the same issues. Here is what I did

Quote
ajdawson
You have an error in your SQL syntax check the manual that corresponds to your MySQL server version for the right syntax to use near 'ignore table phorum_users drop user_data' at line 1.

This seems to be just PHP7-incomatibility, worked with PHP 5.6


Quote
ajdawson

If I push on with the upgrade despite this error, at step 7 of 45 (2007042700 to 2007050300) I see another message about SQL syntax: 'ignore table phorum_users add column real_name varchar(255) not null defaul' (yes, there is not 't' on the end of default in this message' and the real_name column is not added to the table. Pressing on again at this point eventually causes the entire upgrade to crash and burn at the next step as it attempts to insert data into the real_name column.

Modify include\db\upgrade\mysql-patches\2007050300.php and replace "ALTER IGNORE TABLE" to "ALTER TABLE". "ALTER IGNORE" is deprecated in modern MySQL versions.


Then do the same in all other mysql-pathes files, at least 2007050302.

Step ~12 out of 47 takes forever, timed out in my webbrowser upgrade, had to switch to console version.

2007050902-patch was producing tons of warnings "array_keys() expects parameter 1 to be array, null given in" and also taking forever, but seems fine


...to be continued
Re: Upgrade from 5.1.19 to 5.2.23
July 13, 2024 08:08AM
Quote
Lega4


...to be continued

Okay, it won't... It have caused me way too much issues, especially lack of PHP7 compatibility, so it became a deciding factor and I have migrated my instance to Discourse. I was very happy to figure out there is a proper migration script from Phorum exists there and even though it needed some fine tuning, ended up being way more smooth than upgrading phorum itself.

Good luck to all who is still here :)
Sorry, only registered users may post in this forum.

Click here to login