Hi,
I'm having problems upgrading my forum to the 2.0 release. I am working on a copy of my server on a virtual machine. When I attempt an upgrade I see the following:
Executing database changes
Please be patient - this may take some time on large forums. The time elapsed increments from the server to show progress is being made!
Executing upgrade script 1 of 2.
Executing: "Updating and creating indexes..." (1 of 19 - of this script).
Database Updates Complete! Click Continue to Proceed.
!!Error!
Unknown Error!
If I run the mysql server with query logging on, these are the only queries executed against the database:
Tcp port: 0 Unix socket: /web/tmp/mysql/mysql.sock
Time Id Command Argument
091220 15:40:32 2 Connect smf@localhost on
2 Init DB smf
2 Query SET NAMES utf8
2 Query SELECT variable, value
FROM t_settings
2 Query SELECT variable, value
FROM t_themes
WHERE id_theme = 1
AND variable IN ('theme_url', 'theme_dir', 'images_url')
2 Query ALTER TABLE t_boards ORDER BY id_board
2 Quit
091220 15:40:41 3 Connect smf@localhost on
3 Init DB smf
3 Query SET NAMES utf8
3 Query SELECT variable, value
FROM t_settings
3 Query SHOW COLUMNS
FROM t_members
LIKE 'memberName'
3 Query SELECT id_member, memberName AS member_name, passwd, id_group,
additionalGroups AS additional_groups, lngfile
FROM t_members
WHERE memberName = 'adminloginhere'
3 Query SELECT variable, value
FROM t_themes
WHERE id_theme = 1
AND variable IN ('theme_url', 'theme_dir', 'images_url')
3 Query SHOW TABLE STATUS
LIKE 't_members'
3 Query SHOW COLLATION
LIKE 'utf8_general_ci'
3 Quit
As you can see, despite what the on-screen status message says, it doesn't even attempt to execute any SQL statements to modify the indexes of t_members.
I had similar problems attempting to upgrade to 2.0rc1 a few months ago, and thought it might be fixed in this 2nd beta, but it still isn't working.
EDIT: I was able to work around this by disabling javascript in my browser while running the upgrade script to get past the database changes.
However, then the rest of the upgrade script didn't work properly due to the "alert" function being used to display the list of files I had to update (I have no ftp on the server), so after the database step I had to set javascript back on to finish.
Thank you very much for sharing your results!
This is very very strange... I always suspected there's a problem sometimes with javascript in the upgrade script but never managed to replicate properly the issues that would trigger it.
What browser were you using?
Could you please tell a phpinfo() link? (What is a phpinfo() file? (http://docs.simplemachines.org/index.php?topic=479.0))
An alert displaying files that should be writable?
I first tried with Firefox 3.5 with NoScript installed but the forum site in the allowed list. When this failed, I tried with a Vanilla IE 8 and it also failed. Eventually I went back to Firefox and blocked the forum site with noscript to make it work.
The problem is something to do with line 2812 of upgrade.php. It exits the function there as soon as it reads line 9 of upgrade_1-1.sql. Turning off javascript prevents it matching that 'if' condition and it runs properly.
This was tested on a virtual machine on my desktop, so I can't link you to the phpinfo url. I'm using PHP Version 5.2.10, Xcache 1.2.2 and mysql 5.1.36, but I think from looking at the upgrade script that its a pure logic error in the parse_sql function rather than something to do with php config.
The alert displaying files that should be writable came form a custom theme I had created where the files did not have correct permissions to update the theme. There was no problem that this alert condition occurred - the bug is that the upgrade script is trying to use the javascript alert() function to tell me about the problem when I click on the "here" link when it knows that javascript is disabled.
Thank you.
This problem is still happening upgrading 1.1.14 to 2.0 Gold. Upgrade with javascript disabled works. Upgrade with it enabled fails in all the major browsers.