-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More upgrader fixes #8204
More upgrader fixes #8204
Conversation
Signed-off-by: Jon Stovell <[email protected]>
Signed-off-by: Jon Stovell <[email protected]>
Signed-off-by: Jon Stovell <[email protected]>
Signed-off-by: Jon Stovell <[email protected]>
Signed-off-by: Jon Stovell <[email protected]>
Signed-off-by: Jon Stovell <[email protected]>
Signed-off-by: Jon Stovell <[email protected]>
@Oldiesmann, please test to confirm that upgrading now works in both the browser and on the command line. |
Upgrade went smoothly with MySQL via the browser. Will test with PostgreSQL on command line shortly. |
Upgrade went fine in the shell as well but I still got a deprecation warning for pg_version() even after making the changes, this time on line 75 of upgrade.php. |
Latest commit should fix that, @Oldiesmann. Can you please test on PG one more time? |
New problem this time.
The problem is that $_SERVER['QUERY_STRING'] is never set when running via CLI (since there is no query string as we're running the file directly through the PHP interpreter). Best option would be to just check whether we're running from the command line and skip that check if so. I'm not sure why I didn't run into this last time, unless I just wasn't paying attention. |
Normally, and this is just a general observation. QueryString will pretty much mirror argv. If the browser script is supporting params being passed the same options should "generally" be passable via argv in shell should they not? |
The code in question is simply checking whether someone is trying to be funny by sticking a URL in the query string. Completely irrelevant when upgrading via CLI. // It seems that sticking a URL after the query string is mighty common, well, it's evil - don't.
if (strpos($_SERVER['QUERY_STRING'], 'http') === 0) {
Utils::sendHttpStatus(400);
die;
} |
Signed-off-by: Jon Stovell <[email protected]>
Signed-off-by: Jon Stovell <[email protected]>
Signed-off-by: Jon Stovell <[email protected]>
Signed-off-by: Jon Stovell <[email protected]>
Signed-off-by: Jon Stovell <[email protected]>
Signed-off-by: Jon Stovell <[email protected]>
Signed-off-by: Jon Stovell <[email protected]>
c3dd3bf
to
5b11070
Compare
It's strange that I don't receive any such errors in my tests. But at any rate, try now. |
Latest attempt...
|
Er, are you sure you tested with the correct commit checked out? The connection is provided on line 1113. |
I'll double check. I may have forgotten to update that file. |
That got rid of the deprecation error. It still dies with the other error though. |
Further digging reveals that the query beginning on line 129 of upgrade_3-0_PostgreSQL.sql is failing because there is no longer an end_time column in the calendar table (since that was dropped during a previous run of the upgrader). We either need to check whether that column exists first or add a setting indicating we've already completed that part previously and then skip the event conversion stuff if so. |
Hopefully the latest commit will finish it. |
Unfortunately not.
|
It's because the "{" in the if statement on line 128 of upgrade_3-0_PostgreSQL.sql is never closed. I'm just not sure where to add it. |
Bleh. I must have made the same mistake there that I made earlier in the MySQL file. Not sure why I didn't catch it when I checked after finding the one in the MySQL file. |
c09268a
to
9357399
Compare
Signed-off-by: Jon Stovell <[email protected]>
9357399
to
5fe7532
Compare
Everything completed successfully this time, though it did show |
d277cdc
to
b5cee38
Compare
Fixes #8197
Fixes #8198
Fixes #8199