Page MenuHomePhabricator

Command line installer warning output broken
Closed, ResolvedPublic

Description

Author: ezyang

Description:
Command line install doesn't work. Seems to be a bad invocation of call_user_func_array. Did you even test this path?

ezyang@javelin:~/Dev/mediawiki-1.17.0$ php maintenance/install.php --dbname wizard_test_mediawiki_install_head --dbpass ** --dbserver localhost --dbuser root --email ezyang@mit.edu --pass wizard TestApp admin
PHP 5.3.3-1ubuntu9.5 is installed.
Warning: Could not find eAccelerator http://eaccelerator.sourceforge.net, APC http://www.php.net/apc, XCache http://trac.lighttpd.net/xcache/ or WinCache http://www.iis.net/download/WinCacheForPhp.
Object caching is not enabled.
Found ImageMagick: /usr/bin/convert.
Image thumbnailing will be enabled if you enable uploads.
Warning: The intl PECL extension http://pecl.php.net/intl is not available to handle Unicode normalization, falling back to slow pure-PHP implementation.
If you run a high-traffic site, you should read a little on Unicode normalization http://www.mediawiki.org/wiki/Unicode_normalization_considerations.
The environment has been checked.
You can install MediaWiki.
Setting up database
done
Creating tables
PHP Warning: call_user_func_array() expects parameter 2 to be array, string given in /home/ezyang/Dev/mediawiki-1.17.0/includes/installer/CliInstaller.php on line 162
PHP Stack trace:
PHP 1. {main}() /home/ezyang/Dev/mediawiki-1.17.0/maintenance/install.php:0
PHP 2. require_once() /home/ezyang/Dev/mediawiki-1.17.0/maintenance/install.php:95
PHP 3. CommandLineInstaller->execute() /home/ezyang/Dev/mediawiki-1.17.0/maintenance/doMaintenance.php:108
PHP 4. CliInstaller->execute() /home/ezyang/Dev/mediawiki-1.17.0/maintenance/install.php:81
PHP 5. Installer->performInstallation() /home/ezyang/Dev/mediawiki-1.17.0/includes/installer/CliInstaller.php:106
PHP 6. call_user_func() /home/ezyang/Dev/mediawiki-1.17.0/includes/installer/Installer.php:1317
PHP 7. CliInstaller->endStage() /home/ezyang/Dev/mediawiki-1.17.0/includes/installer/Installer.php:0
PHP 8. CliInstaller->showStatusMessage() /home/ezyang/Dev/mediawiki-1.17.0/includes/installer/CliInstaller.php:124
PHP 9. call_user_func_array() /home/ezyang/Dev/mediawiki-1.17.0/includes/installer/CliInstaller.php:162
done
Populating default interwiki table
A database query syntax error has occurred.
The last attempted database query was:
"SELECT * FROM interwiki LIMIT 1 "
from within function "DatabaseInstaller::populateInterwikiTable".
Database returned error "1146: Table 'wizard_test_mediawiki_install_head.interwiki' doesn't exist (localhost)"
Backtrace:
#0 /home/ezyang/Dev/wizard/tests/testdir_mediawiki_install_head/includes/db/Database.php(751): DatabaseBase->reportQueryError('Table 'wizard_t...', 1146, 'SELECT * FROM...', 'DatabaseInstall...', false)
#1 /home/ezyang/Dev/wizard/tests/testdir_mediawiki_install_head/includes/db/Database.php(1050): DatabaseBase->query('SELECT * FROM...', 'DatabaseInstall...')
#2 /home/ezyang/Dev/wizard/tests/testdir_mediawiki_install_head/includes/db/Database.php(1134): DatabaseBase->select('interwiki', '*', Array, 'DatabaseInstall...', Array, Array)
#3 /home/ezyang/Dev/wizard/tests/testdir_mediawiki_install_head/includes/installer/DatabaseInstaller.php(551): DatabaseBase->selectRow('interwiki', '*', Array, 'DatabaseInstall...')
#4 [internal function]: DatabaseInstaller->populateInterwikiTable(Object(MysqlInstaller))
#5 /home/ezyang/Dev/wizard/tests/testdir_mediawiki_install_head/includes/installer/Installer.php(1314): call_user_func(Array, Object(MysqlInstaller))
#6 /home/ezyang/Dev/wizard/tests/testdir_mediawiki_install_head/includes/installer/CliInstaller.php(106): Installer->performInstallation(Array, Array)
#7 /home/ezyang/Dev/wizard/tests/testdir_mediawiki_install_head/maintenance/install.php(81): CliInstaller->execute()
#8 /home/ezyang/Dev/wizard/tests/testdir_mediawiki_install_head/maintenance/doMaintenance.php(108): CommandLineInstaller->execute()
#9 /home/ezyang/Dev/wizard/tests/testdir_mediawiki_install_head/maintenance/install.php(95): require_once('/home/ezyang/De...')
#10 {main}


Version: 1.17.x
Severity: normal

Details

Reference
bz29589

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:34 PM
bzimport set Reference to bz29589.
bzimport added a subscriber: Unknown Object (MLST).

ezyang wrote:

Warnings may not be arrays, which is why the callback is broken. Here is an example:

array(1) {

[0]=>
string(27) "config-install-tables-exist"

}

I'm not really sure how you would fix this, since the output function does expect an array.

saper changed the task status from Open to Stalled.Oct 24 2015, 2:23 AM
saper subscribed.

This part of code got rewritten, please reopen if still found.

saper claimed this task.