View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0013450 | mantisbt | upgrade | public | 2011-10-28 13:06 | 2011-11-07 08:20 |
Reporter | Tarendai | Assigned To | dregad | ||
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Summary | 0013450: upgrade failure | ||||
Description | I have a 1.1.2 installation on a server. I have duplicated it locally and everything works. I have proceeded to attempt to bring this installation up to 1.2.8, with no success. I got to 1.1.8 before I had issue, if I set up 1.2.0 or 1.2.8 and attempt to use the database and upgrade it, I cannot proceed. Note to get this far I had to perform the undocumented step of adding $g_database_version to the config ( itself yet another bug in the upgrade process, seriously did you guys not test this? ). Running the page at admin/install.php results in: Schema CreateTableSQL ( mantis_bug_file_table ) BAD I'm sure I could nuke the table locally but I have a production install for which the data must be preserved. But just out of curiosity, I renamed the table and added a 2 on the end, and re-ran, and got this: BAD So it seems the only reliable way of upgrading mantis to the 1.2.X versions is to delete all my tables, and thus all my data? I've googled and found other people with this issue, some on this tracker, but nowhere is there a solution, and in all cases the forum thread ended with nothing more, or the ticket was closed with no solution. | ||||
Steps To Reproduce | Attempt to upgrade from pre 1.2.0 to 1.2.0 or later | ||||
Tags | No tags attached. | ||||
First of all, can you reference the related issues? Perhaps there's valuable information there. Second of all, what is your database server and version, and what PHP version do you use? |
|
"Note to get this far I had to perform the undocumented step of adding $g_database_version to the config ( itself yet another bug in the upgrade process, seriously did you guys not test this? )." Question: Are you currently using 1.1.8 from debian ? At least at one point, they replaced our installation/upgrade procedure with their own, so did not include the database version information. |
|
Nope locally I'm running XAMPP on windows 7, we set it up on the server via FTP I checked in the downloads for 1.1.8 to see if that variable was present in the sample config and couldn't find it |
|
Apologies for the delay, I have the environment set up at my work machine: PHP Version 5.2.6 Installed from XAMPP, running under windows 7 x64, using a root mysql user |
|
Of note: http://www.mantisbt.org/forums/viewtopic.php?f=2&t=10830 Although that user is upgrading from a much earlier version, the changes suggested if they work, should be applied |
|
Person with a similar issue who decided to nuke the DB and install afresh ( not possible in my case ): |
|
I just did a quick test here
So it would be interesting to know, what you did and what problems/error messages you encountered before applying that "undocumented step"... |
|
If I coment out the definition of that variable, I fail one of the checks: Config File Exists but Database does not POSSIBLE PROBLEM |
|
If I uncomment it, the check passes, and the install form changes into an upgrade form. Removing the DB user+pass so it uses the default leads to: BAD |
|
Of note, I do not see that variable defined in the sample config included with 1.2.8 |
|
Also, the database does exit, and I have a working 1.1.2 install running off of said database |
|
means that install.php was not able to connect to your database using the provided credentials. (and consequently the attempt to retrieve the current schema version from the mantis_config_table, failed) I'd suggest to double-check in the config_inc.php present in your 1.2.8 directory, the values of |
|
hmmm I have this in my config_inc.php:
I use identical login and hostname on numerous Wordpress sites and MySQL Query Browser ( albeit different database names. As a test I nuked the tables in that database and reloaded install.php, and it said the same Config File Exists message. I then proceeded with a fresh install, and it works, albeit I now have a fresh empty mantis, and all my data is gone until I put my db backup up again and I'm back where I started. So the issue is not the connection to the database, the install script will happily create a new fresh install with the same config and DB details |
|
So let's assume your connection information in config_inc.php is indeed correct. Can you confirm what happens if you copy this file to your 1.2.8 installation as-is, then navigate to the login page (e.g. http://yourhost/mantis128/login_page.php) If your setup is indeed correct, you should see the login page with a warning: "The database structure may be out of date. Please upgrade here before logging in.". Report results or any errors. |
|
I get: APPLICATION ERROR 0000401 I'm currently working on redoing the database export and import from the live site, just to be sure about things |
|
I'm surprised the login page would query the category table - looks like a redirect to another page. Can you make sure you're logged out (logout_page.php) ? Setting $g_show_detailed_errors = ON; may also help. |
|
I found some issues regarding the file table, dropped all the tables locally, changed mysql packet size to 16MB from 1MB, put the backup in full, having sorted the issues out from before, so now the local database is a verified perfect replica of the remote DB. Re-ran tests with new DB import, same results, no upgraded database =( |
|
Ah, loaded in incognito mode I get a login dialog, with the usual "Warning: Admin directory should be removed." message |
|
Here's the database version row in mantis_config_table: 'database_version', 14, 0, 90, 1, '63' |
|
|
|
Incognito mode, aka private browsing in google chrome. I logged out and tried it in normal mode too with the same result ( no other warnings ) Anyways, I modified the value from 14 to 0 as requested, and ran the upgrade script at admin/install.php, SUCCESS!! Update succesful, I now have a working install of 1.2.8 running locally. Thus I can verify it was the project id being non-zero |
|
Someone must have manually changed this value in the manage configuration view or directly in the database. Anyway, glad you're up and running now. |
|
Thanks for the help =] |
|
@dregad: that was some nice sleuthing you did there :-) Perhaps there's some sort of check we can perform against database_version so we don't get thrown off balance by an invalid configuration setting? |
|
@rombert, thanks :-) Regarding an additional check: considering after verification that this variable actually can't be set from the GUI in the manage configuration page (since it's not defined in config_defaults_inc.php), as far as I can tell the only way to change it is by direct SQL update. So it could definitely be done, but the question is, is it worth the effort? |
|
(In reply to comment 0013450:0030134)
Not sure, hopefully this does not show up again... |
|