News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Trying to upgrade from 1.1.15 to 2.0.15

Started by SteveZand, April 03, 2020, 02:17:57 AM

Previous topic - Next topic

SteveZand

Hello,

I'm trying to upgrade my forum from 1.1.15 to 2.0.15

First on the server Ubuntu 12.04

After getting this error:

PHP Fatal error:  Function name must be a string in /var/www/mamjo.com/www/forum/upgrade.php on line 851

I read on this forum that this is probably cause by old PHP version. I'm running PHP 5.3, while the minimum is supposed to be 5.4.

I've tried several methods from googling to upgrade to PHP 5.4, but this repository doesn't exist anymore:

add-apt-repository ppa:ondrej/php5-oldstable

I dont want to upgrade to PHP 5.6 because upgrading to PHP 5.6 involves also upgrading apache2 2.2 to version 2.4, which will brake al lot of configurations. So definitely not my first choice.

Next I've tried to install an older version of Xampp (xampp-win32-5.6.36-0-VC11-installer) on windows, and run the upgrade.

Everything starts fine but almost at the end of the conversion, it stops with an error.

Which what i've read here on the forum is due to incompatibilities with MariaDB.

this is the error:



Renaming table columns......done
Migrating old board profiles to profile system...done
Renaming table columns......done
Renaming table columns......done
Check the predefined profiles all have the right permissions...done
Check the predefined profiles all have the right permissions...done
Check the predefined profiles all have the right permissions...done
Check the predefined profiles all have the right permissions...done
Check the predefined profiles all have the right permissions...done
Check the predefined profiles all have the right permissions...done
Check the predefined profiles all have the right permissions...done
!!Error!
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 5


PHP Fatal error:  Function name must be a string in /var/www/mamjo.com/www/forum/upgrade.php on line 851


So now I'm stuck...What can I do now?



shawnb61

I believe you will have more luck upgrading directly to 2.0.17 if you're running 5.3.  It's worth a shot. 

But...  The bottom line is you really need to upgrade apache & php... 

Are you on MariaDB?  Some builds of MariaDB have issues confusing SMF column names with keywords.  That would take special care & attention. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

Quote from: shawnb61 on April 03, 2020, 12:11:10 PM
I believe you will have more luck upgrading directly to 2.0.17 if you're running 5.3.

Think I tried that, doesn't work.  Good luck getting this done on an obsolete platform. :P
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

SteveZand

Quote from: shawnb61 on April 03, 2020, 12:11:10 PM
I believe you will have more luck upgrading directly to 2.0.17 if you're running 5.3.  It's worth a shot. 

But...  The bottom line is you really need to upgrade apache & php... 

Are you on MariaDB?  Some builds of MariaDB have issues confusing SMF column names with keywords.  That would take special care & attention.

Just for clarity I've tried two upgrade paths

1 one on the server, php 5.3 /mysql

2 the other on my pc with xampp, which is php / MariaDB

Both failed

SteveZand

Quote from: SteveZand on April 03, 2020, 02:15:48 PM
Quote from: shawnb61 on April 03, 2020, 12:11:10 PM

So what can I try now? I want to upgrade Lamp *after* upgrading the forum, because I'm afraid if I first upgrade Lamp, the old forum software won't run at all anymore.
I believe you will have more luck upgrading directly to 2.0.17 if you're running 5.3.  It's worth a shot. 

But...  The bottom line is you really need to upgrade apache & php... 

Are you on MariaDB?  Some builds of MariaDB have issues confusing SMF column names with keywords.  That would take special care & attention.

Just for clarity I've tried two upgrade paths

1 one on the server, php 5.3 /mysql

2 the other on my pc with xampp, which is php / MariaDB

Both failed

shawnb61

#5
Need to be more specific than "both failed". 

Did you try 2.0.17 as suggested above?  I believe you will have better luck with 2.0.17 & mysql & php5.3.   (It should be better than 2.0.15.)

We have had issues with certain MariaDB builds.  In general we were able to work thru it, but it was work.  The first step is to figure out which columns are confused with keywords.  Then customize the upgrader appropriately. 

Is the MariaDB environment also php5.3?


Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

SteveZand

Quote from: shawnb61 on April 03, 2020, 03:55:32 PM
Need to be more specific than "both failed". 
In topic start, I've been very specific :-)

Quote from: shawnb61 on April 03, 2020, 03:55:32 PM
Did you try 2.0.17 as suggested above?  I believe you will have better luck with 2.0.17 & mysql & php5.3.   (It should be better than 2.0.15.)

Not yet, gonna try it later


Quote from: shawnb61 on April 03, 2020, 03:55:32 PM

Is the MariaDB environment also php5.3?

No, MariaDB environment is een xampp windows stack, i've tried

xampp-win32-5.6.36-0-VC11-installer
xampp-windows-x64-5.6.40-0-VC11-installer
xampp-windows-x64-7.4.4-0-VC15-installer

On xampp-windows-x64-7.4.4-0-VC15 1.1.15 wont run because of deprecated functions, I'm not sure if that's necessary for the upgrade?



SteveZand

Quote from: SteveZand on April 03, 2020, 02:17:57 AM
Time Elapsed: 15 mins, 37 seconds.
Database Changes
Executing database changes
Please be patient - this may take some time on large forums. The time elapsed increments from the server to show progress is being made!
Executing upgrade script 2 of 2.
Executing: "Adding permission profiles for boards." (16 of 42 - of this script)

Updating indexes on "messages"...done
Updating table indexes...done
Reordering boards and categories...done
Updating indexes and data on "smileys"...done
Updating indexes on "log_boards"...done
Updating indexes on "log_mark_read"...done
Updating indexes on "themes"...done
Updating data in "settings"...done
Adding new settings...done
Adding PM spam protection settings...done
Cleaning old values from "settings"...done
Encoding SMTP password...done
Adjusting timezone settings...done
Installing theme settings...done
Renaming personal message tables...done
Updating indexes on "pm_recipients"...done
Updating columns on "pm_recipients"...done
Updating columns on "members"...done
Updating columns on "members" - part 2...done
Updating member approval...done
Adding new holidays...done
Updating event start and end dates...done
Converting other date columns...done
Checking for an old table...done
Creating "message_icons"...done
Inserting "message_icons"...done
Creating "package_servers"...done
Inserting "package_servers"...done
Updating flood control log...done
Updating ip address storage...done
Converting "log_online"...done
Updating poll column sizes...done
Updating attachments table...done
Updating boards and topics...done
Updating members...done
Recounting member pm totals (step 1)...done
Recounting member pm totals (step 2)...done
Converting server stored setting...done
Converting avatar upload setting...done
Updating attachments...done
Updating settings...done
Registering thumbs...done
Adding image dimensions...done
Splitting ban table...done
Updating ban statistics...done
Deleting some very old permissions...done
Renaming permissions...done
Upgrading "deny"-permissions...done
Upgrading post based group permissions...done
Upgrading by-board permissions...done
Removing all guest deny permissions...done
Removing guest admin permissions (if any)...done
Creating search cache tables...done
Rebuilding fulltext index...done
Indexing topic subjects...done
Converting settings...done
Creating log table indexes (this might take some time!)...done
Preparing log table upgrade...done
Converting log tables (this might take some time!)...done
Updating last message IDs for boards...done
Cleaning up old log indexes...done
Preparing messages table for strict upgrade...done
Adjusting text fields......done
Adjusting text fields...done
Adjusting text fields...done
Replacing messages index...done
Replacing messages index...done
Replacing messages index...done
Adding log_topics index...done
Adding log_topics index...done
Updating the members table ...done
Adding log_topics index...done
Updating the members table ...done
Expanding message column size...done
Updating the members table ...done
Expanding message column size...done
Sorting the boards...done
Expanding message column size...done
Sorting the boards...done
Moving to next script file...done
Creating Scheduled Task Table...done
Populating Scheduled Task Table...done
Renaming table columns......done
Adding the simple machines scheduled task...done
Renaming table columns......done
Deleting old scheduled task items...done
Renaming table columns......done
Moving auto optimise settings to scheduled task...done
Renaming table columns......done
Creating Scheduled Task Log Table...done
Renaming table columns......done
Adding new scheduled task setting...done
Renaming table columns......done
Setting the birthday email template if not set...done
Renaming table columns......done
Creating "permission_profiles" table...done
Renaming table columns......done
Adding profile columns to boards table...done
Renaming table columns......done
Adding profile columns to board permission table...done
Renaming table columns......done
Cleaning up some 2.0 Beta 1 permission profile bits...done
Renaming table columns......done
Migrating old board profiles to profile system...done
Renaming table columns......done
Renaming table columns......done
Check the predefined profiles all have the right permissions...done
Check the predefined profiles all have the right permissions...done
Check the predefined profiles all have the right permissions...done
Check the predefined profiles all have the right permissions...done
Check the predefined profiles all have the right permissions...done
Check the predefined profiles all have the right permissions...done
Check the predefined profiles all have the right permissions...done

!!Error!
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 5




This is the error on the windows wamp on my pc

Maybe I can change some code in the script?

shawnb61

OK, if I'm following this correctly...

php 5.3, hosted:
- You still haven't tried 2.0.17. 
- FYI - 2.0.15 emphatically does NOT support 5.3.  It will never work. 
- FYI - 2.0.17 theoretically may support 5.3, but, I don't think anybody has had access to a 5.3 environment to test with.  It's too old. 
- If you can upgrade to 2.0.17 with your 5.3 environment, you're gold.
- If not, you really need a version of php from 5.4 to 7.3 to try again.  Time to upgrade.

XAMPP & MariaDB:
- SMF 2.0.x does not support php 7.4.  You need something from 5.4 - 7.3. 
- SMF does not support MariaDB.  It usually works...
- In the past when we've seen this, MariaDB has considered certain SMF column names as reserved words, so it did not like our SQL.  I believe this only impacts installs & upgrades.  If you get past the intall/upgrade, you might be OK.
- When we were able to correct this, it was by putting quotes around the terms that confused Maria DB. 
- The first step is go have MariaDB tell us which terms are reserved.  MariaDB reserved words may be found by examining the sql/lex.h and sql/sql_yacc.yy files.
- PLEASE SHARE THOSE FILES, so we can see what the likely confict is.
- Some term in there conflicts with something in lines 1808-1883 in other/upgrade_2-0-mysql.sql.  Our task is to find the conflict & update the .sql file to correct.

Just FYI - Maria DB threads, which might be informative:
- https://www.simplemachines.org/community/index.php?topic=556263.msg3986865#msg3986865
- https://www.simplemachines.org/community/index.php?topic=557046.0
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

SteveZand

Quote from: shawnb61 on April 04, 2020, 03:09:52 AM
OK, if I'm following this correctly...

Yes it was correct... but before starting with the more complex solutions i first thought about trying several other combinations of versions of  xamp with various smf upgrade versions.

And finally one combination worked:

smf_2-1-rc1_upgrade & xampp-windows-x64-5.6.40-0-VC11

Two times the update script hanged (there was no MySQL disk activity for a while ), but fortunately after refreshing the page it continued.

These versions didnt work for me, because of MariaDB

smf_2-0-15_upgrade
smf_2-0-17_upgrade
smf_2-1-rc2_upgrade

Kindred

Of course, 2.1 rc1 has some serious bugs and you're going to have to upgrade to 2.1 rc2 and rc3
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shawnb61

^^^ Beat me to it.

Note also that patches are not released between RC versions.  I.e., the only way to get current on SMF is to rerun the upgrader, which means loss of mods, themes & any other customizations you have done.  This is why I strongly recommend 2.0.17 for production forums. 

Php 5.3 was EOL in 2014 - 6 years ago. 
Apache 2.2 is so old they aren't even doing security patches anymore. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

SteveZand

Quote from: shawnb61 on April 05, 2020, 10:25:35 AM
This is why I strongly recommend 2.0.17 for production forums. 

Yes i tried, but i didnt succeed neither on the hosted forum nor on the local machine with xampp..

On the hosted machine 2.0.17 didn't run at all... I got this error:

PHP Fatal error:  Function name must be a string in /var/www/mamjo.com/www/forum/upgrade.php on line 851


Quote from: shawnb61 on April 05, 2020, 10:25:35 AM
Php 5.3 was EOL in 2014 - 6 years ago. 
Apache 2.2 is so old they aren't even doing security patches anymore.

A couple of years ago I already tried to upgrade, but i didn't succeed, so I d'dnit tried it anymore at that moment.


When I upgrade the server I gonna give it another try...

Advertisement: