Last modified: 2014-11-18 23:59:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 61350 - Postgres: command-line installer fails every time: "Class 'PostgresqlInstaller' not found"
Postgres: command-line installer fails every time: "Class 'PostgresqlInstalle...
Status: UNCONFIRMED
Product: MediaWiki-Vagrant
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2014-02-13 23:41 UTC by Ocean behind ears
Modified: 2014-11-18 23:59 UTC (History)
4 users (show)

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


Attachments

Description Ocean behind ears 2014-02-13 23:41:27 UTC
I tried using the command-line mediawiki installer to test versions of mediawiki, but the command always failed. I was using the command in this format:

php maintenance/install.php --dbuser=____ --dbpass=____ --pass=___               --dbtype=postgres wiki admin

and I always got the errors:

Fatal error: Class 'PostgresqlInstaller' not found in /vagrant/mediawiki/includes/installer/Installer.php on line 486

PHP Fatal error:  Class 'PostgresqlInstaller' not found in /vagrant/mediawiki/includes/installer/Installer.php on line 486
Comment 1 Marcin Cieślak 2014-08-31 01:23:46 UTC
As of 21eb1ab07a8d95c58c6887078620ec90a05d27d7 (current master as of now)

I am getting a silent database error:

$ php -c /usr/home/saper/php.ini maintenance/install.php --dbtype=postgres --dbuser=bzinstall --dbpass=bzinstall --pass=test wiki admin
PHP 5.3.27-pl0-gentoo is installed.
Warning: Could not find APC, XCache or WinCache.
Object caching is not enabled.
Found ImageMagick: /usr/bin/convert.
Image thumbnailing will be enabled if you enable uploads.
Found the Git version control software: /usr/bin/git.
Warning: No --scriptpath specified, using default: /wiki.
Using server URL "/wiki".
Warning: Your default directory for uploads (/usr/home/saper/public_html/pg/w/images/) is not checked for vulnerability
to arbitrary script execution during the CLI install.
Using the intl PECL extension for Unicode normalization.
The environment has been checked.
You can install MediaWiki.
Setting up database
$ 

Applying I61d5f262e60722bc08201b40b61a298d8af42223 as a fix for the bug 70030 I am getting this:

(...)
Setting up database
A database query error has occurred.
Query: CREATE DATABASE ""
Function: PostgresInstaller::setupDatabase
Error: 42601 ERROR:  zero-length delimited identifier at or near """"
LINE 1: .../* PostgresInstaller::setupDatabase 127.0.0.1 */ DATABASE ""
                                                                     ^


Backtrace:
#0 /usr/home/saper/public_html/pg/w/includes/db/DatabasePostgres.php(537): DatabaseBase->reportQueryError('ERROR:  zero-le...', '42601', 'CREATE DATABASE...', 'PostgresInstall...', false)
#1 /usr/home/saper/public_html/pg/w/includes/db/Database.php(1182): DatabasePostgres->reportQueryError('ERROR:  zero-le...', '42601', 'CREATE DATABASE...', 'PostgresInstall...', false)
#2 /usr/home/saper/public_html/pg/w/includes/installer/PostgresInstaller.php(489): DatabaseBase->query('CREATE DATABASE...', 'PostgresInstall...')
#3 [internal function]: PostgresInstaller->setupDatabase(Object(PostgresInstaller))
#4 /usr/home/saper/public_html/pg/w/includes/installer/Installer.php(1584): call_user_func(Array, Object(PostgresInstaller))
#5 /usr/home/saper/public_html/pg/w/includes/installer/CliInstaller.php(126): Installer->performInstallation(Array, Array)
#6 /usr/home/saper/public_html/pg/w/maintenance/install.php(144): CliInstaller->execute()
#7 /usr/home/saper/public_html/pg/w/maintenance/doMaintenance.php(98): CommandLineInstaller->execute()
#8 /usr/home/saper/public_html/pg/w/maintenance/install.php(158): require_once('/usr/home/saper...')
#9 {main}


which seems to indicates that --dbname parameter is missing.

With pure 1.23.0 (1346cdbba7e7f4560b572a73ecd3625192440e98) I am getting:

PHP 5.3.27-pl0-gentoo is installed.
Warning: Could not find APC, XCache or WinCache.
Object caching is not enabled.
Found ImageMagick: /usr/bin/convert.
Image thumbnailing will be enabled if you enable uploads.
Found the Git version control software: /usr/bin/git.
Warning: No --scriptpath specified, using default: /wiki.
Using server URL "/wiki".
Warning: Your default directory for uploads (/usr/home/saper/public_html/pg/w/images/) is not checked for vulnerability
to arbitrary script execution during the CLI install.
Using the intl PECL extension for Unicode normalization.
The environment has been checked.
You can install MediaWiki.
Setting up database
done
Checking for language PL/pgSQL
done
Creating schema
Tables creation failed.
Make sure that the user "bzinstall" can write to the schema "".

I am not using vagrant stuff, can you check if all files are in place?
Comment 2 Bryan Davis 2014-11-17 21:36:06 UTC
Bulk unassigning bugs from Ori.
Comment 3 Marcin Cieślak 2014-11-18 21:59:43 UTC
can somebody using vagrant confirm this?
Comment 4 Bryan Davis 2014-11-18 23:59:33 UTC
I'm inclined to close this as RESOLVED>INVALID. MediaWiki-Vagrant doesn't have any puppet configuration to install Postgres and the default PHP interpreter (HHVM) installed does not have support for Postgres at this time.

That being said here's what I get when I try that installer option:

  $ php maintenance/install.php --dbtype=postgres --dbuser=foo --dbpass=foo --pass=vagrant pgwiki admin
  HHVM 3.3.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.
  Warning: No --scriptpath specified, using default: /wiki.
  Using server URL "/wiki".
  Warning: Your default directory for uploads (/vagrant/mediawiki/images/) is not checked for vulnerability
  to arbitrary script execution during the CLI install.
  Using the intl PECL extension for Unicode normalization.
  The environment has been checked.
  You can install MediaWiki.
  Setting up database
  Cannot connect to database : DB connection error: Postgres functions missing, have you compiled PHP with the --with-pgsql
option? (Note: if you recently installed PHP, you may need to restart your
webserver and database)
  Cannot connect to database template1: DB connection error: Postgres functions missing, have you compiled PHP with the --with-pgsql
option? (Note: if you recently installed PHP, you may need to restart your
webserver and database)
  Cannot connect to database postgres: DB connection error: Postgres functions missing, have you compiled PHP with the --with-pgsql
option? (Note: if you recently installed PHP, you may need to restart your
webserver and database)

That looks to me like the Postgres installer is being selected but they failing because HHVM is missing Postgres support.

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


Navigation
Links