Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
873 views
in Q2A Core by

I replaced all files of 1.7.1 with those of 1.8.2. then upon ruining the new script for first time it displayed a button to upgrade the db on which I clicked and this error was thrown:

Running query: LOCK TABLES qa_users WRITE, qa_userlogins WRITE, qa_userlevels WRITE, qa_userprofile WRITE, qa_userfields WRITE, qa_messages WRITE, qa_userfavorites WRITE, qa_usernotices WRITE, qa_userevents WRITE, qa_sharedevents WRITE, qa_cookies WRITE, qa_categories WRITE, qa_pages WRITE, qa_widgets WRITE, qa_posts WRITE, qa_blobs WRITE, qa_words WRITE, qa_titlewords WRITE, qa_contentwords WRITE, qa_tagwords WRITE, qa_posttags WRITE, qa_uservotes WRITE, qa_userpoints WRITE, qa_userlimits WRITE, qa_iplimits WRITE, qa_options WRITE, qa_cache WRITE, qa_usermetas WRITE, qa_postmetas WRITE, qa_categorymetas WRITE, qa_tagmetas WRITE ...

8 upgrade step/s remaining...

Q2A version: 1.8.2

1 Answer

+1 vote
by

Looks like the options file has not been included. Strange, as I test all upgrade queries and never had that problem. Should be solvable by adding this line in qa-include/db/install.php just before that function call (line 1489, below where it says case 60:)

require_once QA_INCLUDE_DIR . 'app/options.php';
Then run the upgrade again.
by
The fix makes sense. What doesn't make any sense is the error itself. This function call has been there since v1.8.0-beta1. Maybe the app/options.php file had been included by another function call in the past that is no longer called now... I'd wait to see if this repeats in the future
by
adding require_once QA_INCLUDE_DIR . 'app/options.php'; did not help however upgrading directly from 1.7.1. to 1.8.3 progressed better, this time with this error:

Fatal error: Maximum execution time of 120 seconds exceeded in \q2a\qa-include\qa-db.php on line 227



5 upgrade step/s remaining...

Running query: ALTER TABLE qa_cookies MODIFY writeip VARBINARY(16), MODIFY createip VARBINARY(16) NOT NULL ...

Running query: UPDATE qa_cookies SET writeip = UNHEX(HEX(CAST(writeip AS UNSIGNED))), createip = UNHEX(HEX(CAST(createip AS UNSIGNED))) ...

Running query: ALTER TABLE qa_iplimits MODIFY ip VARBINARY(16) NOT NULL ...

Running query: UPDATE qa_iplimits SET ip = UNHEX(HEX(CAST(ip AS UNSIGNED))) ...

Running query: ALTER TABLE qa_blobs MODIFY createip VARBINARY(16) ...

Running query: UPDATE qa_blobs SET createip = UNHEX(HEX(CAST(createip AS UNSIGNED))) ...

Running query: ALTER TABLE qa_posts MODIFY lastviewip VARBINARY(16), MODIFY lastip VARBINARY(16), MODIFY createip VARBINARY(16) ...
by
I also tried upgrading to 1.7.5 and then to 1.8.3. Still same problem!
...