Page MenuHomePhabricator

0 for the SQLite database name (as in 0.sqlite) breaks installation without warnings
Closed, ResolvedPublic

Description

Author: mediawiktor

Description:
When filling 0 for the SQLite database name and filling anything else in other fields, the installation breaks at "Creating tables..." without any warnings. "00" (two zeroes) work fine. I imagine this must depend on some PHP conditional statements, but just in case my PHP is 5.3.3 and my server is nanoweb.


Version: 1.22.0
Severity: major

Details

Reference
bz40966

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:14 AM
bzimport set Reference to bz40966.
bzimport added a subscriber: Unknown Object (MLST).

sumanah wrote:

Thanks for the bug report!

Confirming for 1.22alpha from git master. Stuck on "Install" page, displays

  • Creating tables...

From /var/log/httpd/error_log :

PHP Fatal error: Call to a member function query() on a non-object in /var/www/html/mediawiki/includes/db/DatabaseSqlite.php on line 231, referer: http://localhost/mediawiki/mw-config/index.php?page=Install

That's line

$res = $this->mConn->query( $sql );
saper set Security to None.
saper subscribed.

(not restricted env per se, but may need similar approach)

Krinkle claimed this task.
Krinkle edited projects, added MW-1.30-release-notes, Performance-Team; removed TestMe.
Krinkle moved this task from Usage problem to Rdbms library on the MediaWiki-libs-Rdbms board.
Krinkle subscribed.

The code now uses a strlen() check, which should avoid any problems from 0 being interpreted as "nothing".