Last modified: 2014-01-15 20:01:26 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 T60167, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58167 - An exception is thrown in web installer if mysql driver is not found, not allowing to choose a different database engine
An exception is thrown in web installer if mysql driver is not found, not all...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.22.0
PC Linux
: High blocker (vote)
: 1.22.x release
Assigned To: Nobody - You can work on this!
:
: 58735 59999 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-07 20:55 UTC by sajjad.gerami
Modified: 2014-01-15 20:01 UTC (History)
11 users (show)

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


Attachments

Description sajjad.gerami 2013-12-07 20:55:36 UTC
In installation step 4 when MW is supposed to list available DBs it gives me this error:

[670fe058] /wiki/mw-config/index.php Exception from line 788 of /var/www/wiki/includes/db/Database.php: DatabaseBase::factory no viable database extension found for type 'mysql'

Backtrace:

#0 /var/www/wiki/includes/installer/WebInstallerPage.php(487): DatabaseBase::factory(string)
#1 /var/www/wiki/includes/installer/WebInstaller.php(275): WebInstaller_DBConnect->execute()
#2 /var/www/wiki/mw-config/index.php(61): WebInstaller->execute(array)
#3 /var/www/wiki/mw-config/index.php(29): wfInstallerMain()
#4 {main}

I don't have mysql installed and I don't want to use mysql. I want to install MW with PostgreSQL. but it seems it's looking for mysql and gives error when it can't find it or something.

---
MediaWiki 1.22.0
PostgreSQL 9.3.1
Debian testing (jessie) 3.11-2-amd64
apache2 2.4.6-3 amd64
Comment 1 sajjad.gerami 2013-12-07 21:04:00 UTC
Environmental checks

Basic checks will now be performed to see if this environment is suitable for MediaWiki installation. Remember to include this information if you seek support on how to complete the installation.
PHP 5.5.6-1 is installed.
Found ImageMagick: /usr/bin/convert.

Image thumbnailing will be enabled if you enable uploads.
Found the Git version control software: /usr/bin/git.
Using server name "http://localhost".
Using server URL "http://localhost/wiki".
Using the intl PECL extension for Unicode normalization.
The environment has been checked. You can install MediaWiki.
Comment 2 sajjad.gerami 2013-12-07 21:25:34 UTC
after I installed mysql (apt-get install php5-mysql) I can see both mysql and postgres in db selection step. that's not a solution and more of a dirty workaround.
Comment 3 Marcin Cieślak 2013-12-07 22:47:17 UTC
After uninstalling php5-mysql* extensions, commandline installer works, but WebInstaller gives:

[58644ce6] /pg/w/mw-config/index.php Exception from line 788 of /usr/home/saper/public_html/pg/w/includes/db/Database.php: DatabaseBase::factory no viable database extension found for type 'mysql'
Backtrace:
#0 /usr/home/saper/public_html/pg/w/includes/installer/WebInstallerPage.php(487): DatabaseBase::factory(string)
#1 /usr/home/saper/public_html/pg/w/includes/installer/WebInstaller.php(275): WebInstaller_DBConnect->execute()
#2 /usr/home/saper/public_html/pg/w/mw-config/index.php(61): WebInstaller->execute(array)
#3 /usr/home/saper/public_html/pg/w/mw-config/index.php(29): wfInstallerMain()
#4 {main}

Reverting Id1a3fc34e94006b880f58de83e5e7c70b21d26ed seems to help.... :/
Comment 4 Jesús Martínez Novo (Ciencia Al Poder) 2013-12-20 15:54:54 UTC
*** Bug 58735 has been marked as a duplicate of this bug. ***
Comment 5 Gerrit Notification Bot 2013-12-23 16:55:47 UTC
Change 103379 had a related patch set uploaded by btongminh:
Output plain text database name in installer if driver not installed

https://gerrit.wikimedia.org/r/103379
Comment 6 Umherirrender 2014-01-07 20:06:58 UTC
Another patch which changed the code path and can be a possible failure: I29df3fc9b3bf5743c1365f757e0cf899d5b96ae9 from Tim Starling

Tim Starling, can you have a look here? Thanks.
Comment 7 Tyler Romeo 2014-01-08 04:57:17 UTC
The issue is that on WebInstallerPage.php:487 the installer is trying to make an instance of *every* database type (not just the one the user wants). It does this only so it can call ->getSoftwareLink() on the object and get a link for displaying in the installer.

The fix for this would probably be to just catch the exception and not include links for database engines that are not supported.

An alternative solution would be to somehow move the extension_loaded() check outside of Database::factory, but that would probably be difficult without refactoring a lot of stuff.
Comment 8 Jesús Martínez Novo (Ciencia Al Poder) 2014-01-08 20:16:37 UTC
(In reply to comment #7)
> An alternative solution would be to somehow move the extension_loaded() check
> outside of Database::factory, but that would probably be difficult without
> refactoring a lot of stuff.

This error is blocking new installations and existing ones that want to upgrade.

Just an idea: Let's find a quick and easy way to prevent the error from happening, reverting the commit that broke it if needed, and plan to fix it "properly" for 1.23.0 ;)
Comment 9 Gerrit Notification Bot 2014-01-09 07:11:47 UTC
Change 106489 had a related patch set uploaded by PleaseStand:
WebInstaller: Don't call getSoftwareLink()

https://gerrit.wikimedia.org/r/106489
Comment 10 Gerrit Notification Bot 2014-01-09 07:11:58 UTC
Change 106490 had a related patch set uploaded by PleaseStand:
Clean up config-support-* messages

https://gerrit.wikimedia.org/r/106490
Comment 11 Gerrit Notification Bot 2014-01-09 07:12:03 UTC
Change 106491 had a related patch set uploaded by PleaseStand:
Web installer: Remove support for old config-support-* translations

https://gerrit.wikimedia.org/r/106491
Comment 12 Gerrit Notification Bot 2014-01-10 08:46:47 UTC
Change 106490 abandoned by PleaseStand:
Clean up config-support-* messages

Reason:
Squashed into I6dbc9d32, with message keys changed.

https://gerrit.wikimedia.org/r/106490
Comment 13 Gerrit Notification Bot 2014-01-10 08:48:24 UTC
Change 106491 abandoned by PleaseStand:
Web installer: Remove support for old config-support-* translations

Reason:
Squashed into I6dbc9d32, with message keys changed.

https://gerrit.wikimedia.org/r/106491
Comment 14 Gerrit Notification Bot 2014-01-11 21:56:22 UTC
Change 106489 merged by jenkins-bot:
WebInstaller: Don't call getSoftwareLink()

https://gerrit.wikimedia.org/r/106489
Comment 15 Andre Klapper 2014-01-13 14:43:45 UTC
*** Bug 59999 has been marked as a duplicate of this bug. ***
Comment 16 Gerrit Notification Bot 2014-01-15 20:01:26 UTC
Change 103379 abandoned by btongminh:
Output plain text database name in installer if driver not installed

https://gerrit.wikimedia.org/r/103379

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


Navigation
Links