Opened 16 years ago

Closed 16 years ago

#875 closed Defect (fixed)

upgrade_db.php fails if stop_web exists

Reported by: Nicolas Owned by: davea
Priority: Trivial Milestone: Undetermined
Component: Server - Other Version: 6.6.20
Keywords: Cc:

Description

I ran tools/upgrade while my project root had a stop_web file (so that users knew I was in the middle of updating). When the upgrade script tried to check for database updates using upgrade_db.php, it printed a bunch of HTML to the console, saying "Our database server is temporarily shut down for maintenance."

There are many improvements possible. (some of these are alternatives, some are independent ideas)

  • Print the message in plain text instead of HTML.
  • Print a custom message, warning the admin that stop_web is present.
  • Ignore stop_web, connect to database anyway.
  • Warn that stop_web exists, prompt if it should connect to database anyway or not.
  • If stop_web exists, ignore it. If it doesn't exist, create it, perform the update, and then delete it. This would ensure users never get, for example, the result of PHP code not matching the database structure. If sometimes got PHP errors if I happened to reload a project webpage before upgrade finished, because a .php was updated and calling a new function from an .inc that wasn't updated yet.

Change History (1)

comment:1 Changed 16 years ago by davea

Resolution: fixed
Status: newclosed

(In [17839]) - upgrade script: do DB update even if stop_web is present,

rather than spewing an HTML error message. Fixes #875

Note: See TracTickets for help on using tickets.