Last modified: 2014-08-31 03:13:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63092, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61092 - Install hangs on 'Setting up database..' with php errors (due to permissions issue)
Install hangs on 'Setting up database..' with php errors (due to permissions ...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.23.0
All All
: Normal normal (vote)
: 1.23.x release
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-08 17:22 UTC by Moriel Schottlender
Modified: 2014-08-31 03:13 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Moriel Schottlender 2014-02-08 17:22:46 UTC
I'm trying to install 1.23alpha from the git repo, but the installation fails on the final Install page, stuck on "Setting up database..."

I tried to do this a couple of times, with and without extensions, but the issue persists.

Apache shows the following from the error log:

[Sat Feb 08 12:10:46 2014] [error] [client 127.0.0.1] PHP Warning:  Cannot modify header information - headers already sent in /home/moriel/wikimedia/mediawiki/includes/Exception.php on line 261, referer: http://localhost/mediawiki/mw-config/index.php?page=Install
[Sat Feb 08 12:10:46 2014] [error] [client 127.0.0.1] PHP Warning:  Cannot modify header information - headers already sent in /home/moriel/wikimedia/mediawiki/includes/Exception.php on line 262, referer: http://localhost/mediawiki/mw-config/index.php?page=Install
[Sat Feb 08 12:10:46 2014] [error] [client 127.0.0.1] PHP Warning:  Cannot modify header information - headers already sent in /home/moriel/wikimedia/mediawiki/includes/Exception.php on line 263, referer: http://localhost/mediawiki/mw-config/index.php?page=Install
[Sat Feb 08 12:10:46 2014] [error] [client 127.0.0.1] PHP Warning:  Cannot modify header information - headers already sent in /home/moriel/wikimedia/mediawiki/includes/WebResponse.php on line 38, referer: http://localhost/mediawiki/mw-config/index.php?page=Install
[Sat Feb 08 12:10:46 2014] [error] [client 127.0.0.1] PHP Warning:  Cannot modify header information - headers already sent in /home/moriel/wikimedia/mediawiki/includes/WebResponse.php on line 38, referer: http://localhost/mediawiki/mw-config/index.php?page=Install
[Sat Feb 08 12:10:46 2014] [error] [client 127.0.0.1] PHP Warning:  Cannot modify header information - headers already sent in /home/moriel/wikimedia/mediawiki/includes/WebResponse.php on line 38, referer: http://localhost/mediawiki/mw-config/index.php?page=Install
[Sat Feb 08 12:10:46 2014] [error] [client 127.0.0.1] PHP Fatal error:  Call to a member function isSpecialPage() on a non-object in /home/moriel/wikimedia/mediawiki/includes/Skin.php on line 271, referer: http://localhost/mediawiki/mw-config/index.php?page=Install


Environment: Ubuntu 12.10 LTS, PHP 5.3.10-1ubuntu-3.9, mysql 5.5.35-0ubuntu0.12.04.2
Comment 1 Bawolff (Brian Wolff) 2014-02-08 17:41:15 UTC
I was able to generate similar errors by throwing an uncaught exception during the install
Comment 2 Gerrit Notification Bot 2014-02-08 18:05:01 UTC
Change 112243 had a related patch set uploaded by Brian Wolff:
Do not use OutputPage to output exceptions in Installer

https://gerrit.wikimedia.org/r/112243
Comment 3 Bawolff (Brian Wolff) 2014-02-08 18:06:22 UTC
From IRC we determined the original error was due to a permissions issue. Installer should be detecting that, and not simply throwing exceptions.
Comment 4 Gerrit Notification Bot 2014-02-11 03:54:22 UTC
Change 112243 merged by jenkins-bot:
Do not use OutputPage to output exceptions in Installer

https://gerrit.wikimedia.org/r/112243
Comment 5 Andre Klapper 2014-03-02 19:21:16 UTC
Patch was merged a while ago - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?
Comment 6 Bawolff (Brian Wolff) 2014-03-02 21:30:44 UTC
Yes. Permission errors should be handled gracefully instead of dying in an exception.
Comment 7 Mark A. Hershberger 2014-05-09 15:52:51 UTC
We are aiming for 1.23 on this one.  It would be good to get a patch to fix the issue Brian raised this week.
Comment 8 Jeff Janes 2014-05-28 02:23:16 UTC
What is the permission problem?  File system or database?  Can anyone reproduce it without injecting an error through artificial means?  Now that the error handling code has been changed, what error is produced?
Comment 9 Mark A. Hershberger 2014-05-30 11:24:16 UTC
Brian,

Could you update this bug with more details in response to Jeff's questions?
Comment 10 Matěj Grabovský 2014-05-30 13:19:12 UTC
This happens, for instance, when the database already exists but the user doesn't have appropriate permissions. (Actually, I can't imagine what else could go unhandled in setupDatabase() looking at the code.)

Output of the installer in this case:
>* Setting up database...
>  A database query error has occurred. This may indicate a bug in the software.
>  * Query:
>    CREATE DATABASE `calwiki`CHARACTER SET utf8
>  * Function: MysqlInstaller::setupDatabase
>  * Error: 1044 Access denied for user 'calvin'@'%' to database 'calwiki' (localhost)
>  Backtrace: [...]

Upon undoing Gerrit change #112243, a bunch of "Cannot modify header information"s appears, as described in OP, crowned by a "Fatal error: Call to a member function isSpecialPage() on a non-object in E:\www\mediawiki\includes\Skin.php on line 282"
Comment 11 Jeff Janes 2014-06-12 22:55:08 UTC
OK, I can reproduce this by creating an unprivileged mysql user:

create user jeff@localhost identified by 'foo';

I then providing that user and password as the "User account for installation".

The ungracefulness of the error goes back at least to 1.17, although the exact details differ.

I don't know how to fix it, as this error means you would have to go back four pages in the web installation process, and I don't know how to make that happen.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links