XF 2.2 Cannot upgrade 1.5 to 2.2 until "all XenForo database tables are removed"

jamesder

Member
I've copied all of my XF 1.5 stuff over to a staging server and that's working great. The DB imports and everything works fine.

I've downloaded the xenforo_2.2.8-Patch-1_xxxxxx_xxxxx_upgrade and followed the instructions. When I get to the install page, I am told

Oops! We ran into some problems.​

You cannot proceed unless all XenForo database tables are removed."

I don't want to delete all old threads, users, etc...just trying to update from 1.5. to 2.2.

Googling and searching here, it was suggested to make sure that install-lock.php is there, but i don't want to lock the installation, i want to upgrade to 2.2

any ideas? thanks!

(if i proceed with deleting all the xenforo database tables, I'm able to upgrade to 2.2 without issue)
 
Solution
The install-lock.php is there to protect you, not prevent an upgrade.
Put the install-lock.php file back in place and try again.

If the install-lock.php file is not there, it will attempt a fresh installation....
The install-lock.php is there to protect you, not prevent an upgrade.
Put the install-lock.php file back in place and try again.

If the install-lock.php file is not there, it will attempt a fresh installation....
 
Solution
I upload the contents of xenforo_2.2.8-Patch-1_xxxxxx_xxxxx_upgrade

and then navigate to the /forums/install page. it tells me "

Oops! We ran into some problems.​

You have already completed installation. If you wish to reinstall, please delete the file internal_data/install-lock.php."

if i remove install-lock, i get:

Verify configuration​

Your configuration has been verified. You are now ready to begin the installation.
XenForo is already installed in your database. Continuing will remove all XenForo-related data from your database!
  • Remove all XenForo-related data, including posts and users,

I'm just trying to upgrade to 2.2 from 1.5
 
I upload the contents of xenforo_2.2.8-Patch-1_xxxxxx_xxxxx_upgrade

and then navigate to the /forums/install page. it tells me "

Oops! We ran into some problems.​

You have already completed installation. If you wish to reinstall, please delete the file internal_data/install-lock.php."

if i remove install-lock, i get:

Verify configuration​

Your configuration has been verified. You are now ready to begin the installation.
XenForo is already installed in your database. Continuing will remove all XenForo-related data from your database!
  • Remove all XenForo-related data, including posts and users,

I'm just trying to upgrade to 2.2 from 1.5
My 2 guesses here are:

1) The XF2 package wasn't completely uploaded or uploaded incorrectly (wrong location/path, etc).
2) Does the install-lock.php file contents look like this:
Code:
<?php header('Location: ../index.php'); /* Installed: Sun, 21 Jul 13 06:27:44 +0000 */

If you still can't get past this, I'd raise a support ticket to get some direct assistance. I've done a few XF1 > XF2 upgrades in the past year and they've all been pretty smooth.
 
My 2 guesses here are:

1) The XF2 package wasn't completely uploaded or uploaded incorrectly (wrong location/path, etc).
2) Does the install-lock.php file contents look like this:
Code:
<?php header('Location: ../index.php'); /* Installed: Sun, 21 Jul 13 06:27:44 +0000 */

If you still can't get past this, I'd raise a support ticket to get some direct assistance. I've done a few XF1 > XF2 upgrades in the past year and they've all been pretty smooth.

I’ve been FTPing the upgrade files. I’m using Transmit and at each conflict, it gives me an option to skip, merge or replace. Based on the documentation, I choose Merge when that option is available and Replace when there is no merge option. Am I doing that wrong?
 
All of the files need to be overwritten.

I've never seen a merge option with an FTP client for a file before so don't know what that is.
 
All of the files need to be overwritten.

I've never seen a merge option with an FTP client for a file before so don't know what that is.
Great thanks!

Weird, it seems to come up here somewhat often because of confusion over this in the upgrade docs:


Note

When uploading files, it's very important that you "merge" files with what's on the server. Some FTP clients may simply replace the contents on the server with exactly the contents that you're uploading. If this happens, some files and data may be lost”
 
Merge is for directories, not files.

However, the existing files in those directories still need to be overwritten with the new versions.

I would recommend using another FTP client - problems of this nature should never happen.
 
I don't think it's a problem with the FTP client. It's a common and well respected client. It's just being precise. When it sees that a file already exists, it asks if you'd like to replace that file or skip that upload. If it sees a directory, it asks if you'd like to replace it, merge the existing directory with the one you're uploading or skip the process entirely.

What's not clear in the documentation is what 1.5.x files or directories need to be replaced and which should stay. Maybe this is only made confusing by the warning about Merging in the docs.

@Brogan I believe you're saying all files and directories should be overwritten (any necessary data stays safe in the DB).
 
no matter what i try, i keep getting:

Verify configuration​

Your configuration has been verified. You are now ready to begin the installation.
XenForo is already installed in your database. Continuing will remove all XenForo-related data from your database!
  • Remove all XenForo-related data, including posts and users, from db-name_xxenforo
and then

Oops! We ran into some problems.​

You cannot proceed unless all XenForo database tables are removed.


I don't understand this line "XenForo is already installed in your database. Continuing will remove all XenForo-related data from your database!"

xenforo is supposed to be already installed in my database for an upgrade, isn't it?
 
no matter what i try, i keep getting:

Verify configuration​

Your configuration has been verified. You are now ready to begin the installation.
XenForo is already installed in your database. Continuing will remove all XenForo-related data from your database!
  • Remove all XenForo-related data, including posts and users, from db-name_xxenforo
and then

Oops! We ran into some problems.​

You cannot proceed unless all XenForo database tables are removed.


I don't understand this line "XenForo is already installed in your database. Continuing will remove all XenForo-related data from your database!"

xenforo is supposed to be already installed in my database for an upgrade, isn't it?
Based on the history written above, I'm siding with the idea that you have not properly uploaded the XF2 installation package so that it can fire off the way it's intended to. Either you've uploaded in the wrong place or the upload wasn't done fully and/or correctly.

To date, I've never run into such a problem to install an upgrade. I usually upload the zip package to a staging area on the server and then just copy the contents of the upload folder right into the directory where XF is running from, overwriting/replacing files with the new file versions. (This does not affect the site data) Navigating over to ../install/ kicks off the upgrade each time. Otherwise, for S/FTP I use SecureFX but something like FileZilla works just as fine... same process, upload contents of of the /upload folder to the XF installation folder, overwriting and replacing the old files with the new ones. Again, navigating to ../install/ kicks off the upgrade process correctly each time.

Your evidence provided tells me that the the upgrade doesn't kickoff because the installer appears to be for the same version that's already there and thus it's warning you about this.

An XF2 that's already installed, looks like this:
1644246912974.png

An XF1.5.x Site Looks like this:
1644247114847.png
Install Lock Error (If you click on the 'click here')
1644247200357.png

If the new upgrade files are uploaded correctly, it would automatically fire into the upgrade script.
 
Last edited:
is there anything else that could be going on? I've tried every that way I can think of.

Is it ok to have left the data folder there? It takes a bit to transfer that folder and it looked like it was all binaries/static assets.

I've also left the internal_data folder there as it looks like it carries info over from the old 1.5 forum. I've tried removing it and leaving it there and I get the same results.
 
when i navigate to the root after initiating that process, i get:

An exception occurred: [TypeError] Argument 2 passed to XF\Mvc\Router::suffixMatchesRoute() must be of the type array, string given, called in /chroot/home/my-site/forums.my-site.com/html/src/XF/Mvc/Router.php on line 253 in src/XF/Mvc/Router.php on line 285

  1. XF\Mvc\Router->suffixMatchesRoute() in src/XF/Mvc/Router.php at line 253
  2. XF\Mvc\Router->routeToController() in src/XF/Mvc/Dispatcher.php at line 67
  3. XF\Mvc\Dispatcher->route() in src/XF/Mvc/Dispatcher.php at line 49
  4. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2351
  5. XF\App->run() in src/XF.php at line 517
  6. XF::runApp() in index.php at line 20

Could I have a PHP version error?
 
regarding php error, i do get:

XenForo 2.2.8 Patch 1 - Welcome​

Your server meets all of XenForo requirements and you're now ready to begin installation.

on the previous screen, so I assume I'm good there.
 
It may be worth reviewing the upgrade documentation, which touches on the original issue.

should i be downloading the "upgrade only" package when going from 1.5 to 2.x? That's what i've been doing. Should I be downloading the full 2.x install?
The only real difference is that the upgrade package does not contain empty data/ and internal_data/ directories to help prevent the contents of the existing ones from being erroneously removed, which is to say you can/should use the upgrade package.

Is it ok to have left the data folder there? It takes a bit to transfer that folder and it looked like it was all binaries/static assets.

I've also left the internal_data folder there as it looks like it carries info over from the old 1.5 forum. I've tried removing it and leaving it there and I get the same results.
These should be left in place for upgrades (or transferred to your staging server for test upgrades), particularly as the internal_data/ directory is what contains the install-lock.php file necessary to trigger an upgrade instead of a new installation.

when i navigate to the root after initiating that process, i get:
This may just be a side-effect of the upgrade not having been performed yet. To access the upgrader you should visit the /install page directly.
 
  • Like
Reactions: ENF
Top Bottom