Last modified: 2012-08-04 20:49:09 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 T18256, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16256 - Can't install 1.14 with Postgres 8.3
Can't install 1.14 with Postgres 8.3
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.14.x
PC Linux
: Normal blocker (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2008-11-06 07:52 UTC by NSK Nikolaos S. Karastathis
Modified: 2012-08-04 20:49 UTC (History)
3 users (show)

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


Attachments

Description NSK Nikolaos S. Karastathis 2008-11-06 07:52:25 UTC
MediaWiki 1.14alpha r43253 seems not to be able to install itself using the web-based installer on a Debian etch 4.0 system with Postgres 8.3.4 from Debian Backports.

MediaWiki: 1.14alpha (r43253) with PHP 5.3.0-8+etch13 (apache2handler) and PostgreSQL 8.3.4 on x86_64-pc-linux-gnu, compiled by GCC cc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

To reproduce: cd /var/www; mkdir test; cd test; svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3 . ; chmod a+w config; epiphany http://localhost/test/

Most settings default.  No php cache.  Use postgres superuser account to create the database.

Result: The web installer stops being executed, nothing happens, no database created, no LocalSettings.php:

MediaWiki 1.14alpha Installation

    * Don't forget security updates! Keep an eye on the low-traffic release announcements mailing list.

Checking environment...

Please include all of the lines below when reporting installation problems.

    * PHP 5.2.0-8+etch13 installed
    * Found database drivers for: MySQL PostgreSQL SQLite
    * PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
    * Have XML / Latin1-UTF-8 conversion support.
    * Session save path (/var/lib/php5) appears to be valid.
    * PHP's memory_limit is 1024M.
    * Couldn't find Turck MMCache, eAccelerator, APC or XCache; cannot use these for object caching.
    * Found GNU diff3: /usr/bin/diff3.
    * Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if you enable uploads.
    * Found GD graphics library built-in.
    * Installation directory: /var/www/test
    * Script URI path: /test
    * Installing MediaWiki with php file extensions
    * Environment checked. You can install MediaWiki.
    *

      Generating configuration file...
    * Database type: PostgreSQL
    * Loading class: DatabasePostgres

(it stops there, no LocalSettings.php, no database, nothing)




But with MediaWiki 1.13.2 downloaded from SVN it works ok.

To reproduce (drop database from phppgadmin or use other db name): cd /var/www; rm -rf test; mkdir test; cd test; svn checkout http://svn.wikimedia.org/svnroot/mediawiki/branches/REL1_13/phase3 . ; chmod a+w config; epiphany http://localhost/test/

Again most settings default.  No php cache.  Use postgres superuser account to create the database.

MediaWiki 1.13.2 Installation

    * Don't forget security updates! Keep an eye on the low-traffic release announcements mailing list.

Checking environment...

Please include all of the lines below when reporting installation problems.

    * PHP 5.2.0-8+etch13 installed
    * Found database drivers for: MySQL PostgreSQL SQLite
    * PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
    * Have XML / Latin1-UTF-8 conversion support.
    * Session save path (/var/lib/php5) appears to be valid.
    * PHP's memory_limit is 1024M.
    * Couldn't find Turck MMCache, eAccelerator, APC or XCache; cannot use these for object caching.
    * Found GNU diff3: /usr/bin/diff3.
    * Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if you enable uploads.
    * Found GD graphics library built-in.
    * Installation directory: /var/www/test
    * Script URI path: /test
    * Installing MediaWiki with php file extensions
    * Environment checked. You can install MediaWiki.
    *

      Generating configuration file...
    * Database type: PostgreSQL
    * Loading class: DatabasePostgres
    * Attempting to connect to database "postgres" as superuser "postgres"...
    * Checking the version of Postgres...version 8.3 is OK.
    * Creating user mwtest...OK
    * Creating database mwtest...OK
    * Connecting to "mwtest" as superuser "postgres" to check rights...OK
    * Creating schema mediawiki ...OK
    * Checking for Pl/Pgsql ...not installed. Attempting to install Pl/Pgsql ...OK
    * Attempting to connect to database "mwtest" as "mwtest"...
    * Checking the version of Postgres...version 8.3 is OK.
    * Checking for Pl/Pgsql ...OK
    * Schema "mediawiki" exists and is owned by "mwtest". Excellent.
    * Setting the timezone to GMT for user "mwtest" ...OK
    * Setting the datestyle to ISO, YMD for user "mwtest" ...OK
    * Setting the search path for user "mwtest" ...OK
    * Connected to PostgreSQL 8.3.4 on x86_64-pc-linux-gnu, compiled by GCC cc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
    * Creating tables... (table interwiki successfully populated)... done.
    * Initializing statistics...
    * Created sysop account nsk.
    *

      Creating LocalSettings.php...

      Installation successful! Move the config/LocalSettings.php file to the parent directory, then follow this link to your wiki.

Result: Database created and populated ok, LocalSettings.php written ok, and after moving it the wiki works ok.

Conclusion: it seems like mw 1.13 works ok with postgres 8.3, but mw1.14 cannot work with postgres 8.3.
Comment 1 NSK Nikolaos S. Karastathis 2008-11-06 16:25:52 UTC
Creating a 1.13 wiki under postgres and then downloading 1.14 SVN and trying to update the schema produced a segfault:

php ./update.php 
MediaWiki 1.14alpha Updater

Going to run database updates for wikinerds
Depending on the size of your database this may take a while!
Abort with control-c in the next five seconds...0
... search_path for user "wikinerds" looks correct (mediawiki, public)
Setting client_min_messages to 'error' for user "wikinerds"
... default value of "DateStyle" is correctly set to "ISO, YMD" for user "wikinerds"
... default value of "TimeZone" is correctly set to "GMT" for user "wikinerds"
... sequence "log_log_id_seq" already exists
... sequence "pr_id_val" already exists
... table "category" already exists
... table "mediawiki_version" already exists
... table "mwuser" already exists
... table "pagecontent" already exists
... table "querycachetwo" already exists
... table "page_props" already exists
... table "page_restrictions" already exists
... table "profiling" already exists
... table "protected_titles" already exists
... table "redirect" already exists
... table "updatelog" already exists
... obsolete table "archive2" does not exist
... column "archive.ar_deleted" already exists
... column "archive.ar_len" already exists
... column "archive.ar_page_id" already exists
... column "archive.ar_parent_id" already exists
... column "image.img_sha1" already exists
... column "ipblocks.ipb_anon_only" already exists
... column "ipblocks.ipb_by_text" already exists
... column "ipblocks.ipb_block_email" already exists
... column "ipblocks.ipb_create_account" already exists
... column "ipblocks.ipb_deleted" already exists
... column "ipblocks.ipb_enable_autoblock" already exists
Adding column "ipblocks.ipb_allow_usertalk"
... column "filearchive.fa_deleted" already exists
... column "logging.log_deleted" already exists
... column "logging.log_id" already exists
... column "logging.log_params" already exists
... column "mwuser.user_editcount" already exists
... column "mwuser.user_newpass_time" already exists
... column "oldimage.oi_deleted" already exists
... column "oldimage.oi_metadata" already exists
... column "oldimage.oi_media_type" already exists
... column "oldimage.oi_major_mime" already exists
... column "oldimage.oi_minor_mime" already exists
... column "oldimage.oi_sha1" already exists
... column "page_restrictions.pr_id" already exists
... column "profiling.pf_memory" already exists
... column "recentchanges.rc_deleted" already exists
... column "recentchanges.rc_log_action" already exists
... column "recentchanges.rc_log_type" already exists
... column "recentchanges.rc_logid" already exists
... column "recentchanges.rc_new_len" already exists
... column "recentchanges.rc_old_len" already exists
... column "recentchanges.rc_params" already exists
... column "revision.rev_len" already exists
... column "revision.rev_deleted" already exists
... column "user_newtalk.user_last_timestamp" already exists
Adding column "site_stats.ss_active_users"
... column "revision.rev_parent_id" already exists
... column "archive.ar_deleted" is already of type "smallint"
... column "archive.ar_minor_edit" is already of type "smallint"
... column "filearchive.fa_deleted" is already of type "smallint"
... column "filearchive.fa_height" is already of type "integer"
... column "filearchive.fa_metadata" is already of type "bytea"
... column "filearchive.fa_size" is already of type "integer"
... column "filearchive.fa_width" is already of type "integer"
... column "filearchive.fa_storage_group" is already of type "text"
... column "filearchive.fa_storage_key" is already of type "text"
... column "image.img_metadata" is already of type "bytea"
... column "image.img_size" is already of type "integer"
... column "image.img_width" is already of type "integer"
... column "image.img_height" is already of type "integer"
... column "interwiki.iw_local" is already of type "smallint"
... column "interwiki.iw_trans" is already of type "smallint"
... column "ipblocks.ipb_auto" is already of type "smallint"
... column "ipblocks.ipb_anon_only" is already of type "smallint"
... column "ipblocks.ipb_create_account" is already of type "smallint"
... column "ipblocks.ipb_enable_autoblock" is already of type "smallint"
... column "ipblocks.ipb_block_email" is already of type "smallint"
... column "ipblocks.ipb_address" is already of type "text"
... column "ipblocks.ipb_deleted" is already of type "smallint"
... column "math.math_inputhash" is already of type "bytea"
... column "math.math_outputhash" is already of type "bytea"
... column "mwuser.user_token" is already of type "text"
... column "mwuser.user_email_token" is already of type "text"
... column "objectcache.keyname" is already of type "text"
... column "oldimage.oi_height" is already of type "integer"
... column "oldimage.oi_metadata" is already of type "bytea"
... column "oldimage.oi_size" is already of type "integer"
... column "oldimage.oi_width" is already of type "integer"
... column "page.page_is_redirect" is already of type "smallint"
... column "page.page_is_new" is already of type "smallint"
... column "querycache.qc_value" is already of type "integer"
... column "querycachetwo.qcc_value" is already of type "integer"
... column "recentchanges.rc_bot" is already of type "smallint"
... column "recentchanges.rc_deleted" is already of type "smallint"
... column "recentchanges.rc_minor" is already of type "smallint"
... column "recentchanges.rc_new" is already of type "smallint"
... column "recentchanges.rc_type" is already of type "smallint"
... column "recentchanges.rc_patrolled" is already of type "smallint"
... column "revision.rev_deleted" is already of type "smallint"
... column "revision.rev_minor_edit" is already of type "smallint"
... column "templatelinks.tl_namespace" is already of type "smallint"
... column "user_newtalk.user_ip" is already of type "text"
... column "oldimage.oi_deleted" is already of type "smallint"
... index "archive_user_text" on table "archive" already exists
... index "img_sha1" on table "image" already exists
... index "oi_sha1" on table "oldimage" already exists
... index "rev_text_id_idx" on table "revision" already exists
Creating index "rc_timestamp_nobot" on table "recentchanges" (rc_timestamp) WHERE rc_bot = 0
Creating index "templatelinks_from" on table "templatelinks" (tl_from)
Creating index "wl_user" on table "watchlist" (wl_user)
... table "oldimage" has correct cascade delete foreign key to image
... table "page" has "page_deleted" trigger
... column "recentchanges.rc_cur_id" has a NOT NULL constraint
... obsolete version of index "pagelink_unique index" does not exist
... index "pagelink_unique_index" already exists
... constraint "revision_rev_user_fkey" is ON DELETE RESTRICT
... have ipb_address_unique
Done.
Segmentation fault
Comment 2 NSK Nikolaos S. Karastathis 2008-11-06 16:29:57 UTC
furthermore, after the 1.14 update above, attempting to fill an empty category page with some intro text and clicking Save results in no error reported but no page saved, thus data loss.
Comment 3 NSK Nikolaos S. Karastathis 2008-11-06 16:38:18 UTC
moreover, attempting to transform a mysql database to postgres using the maintainance/postgres/mediawiki_mysql2postgres.pl and then using psql to import the resulting sql file reveals this:

psql:mediawiki_upgrade.pg:30: ERROR:  cannot truncate a table referenced in a foreign key constraint
DETAIL:  Table "user_groups" references "mwuser".
HINT:  Truncate table "user_groups" at the same time, or use TRUNCATE ... CASCADE.

Comment 4 NSK Nikolaos S. Karastathis 2008-11-06 16:44:55 UTC
also segfault when using importDump.php:

 php ./importDump.php < wikinerds.xml 

Warning: pg_query(): Query failed: ERROR:  insert or update on table "revision" violates foreign key constraint "revision_rev_page_fkey"
DETAIL:  Key (rev_page)=(0) is not present in table "page". in /var/www/test/includes/db/DatabasePostgres.php on line 559

Warning: pg_query(): Query failed: ERROR:  current transaction is aborted, commands ignored until end of transaction block in /var/www/test/includes/db/DatabasePostgres.php on line 559

Warning: pg_query(): Query failed: ERROR:  current transaction is aborted, commands ignored until end of transaction block in /var/www/test/includes/db/DatabasePostgres.php on line 559

Warning: pg_query(): Query failed: ERROR:  current transaction is aborted, commands ignored until end of transaction block in /var/www/test/includes/db/DatabasePostgres.php on line 559

Warning: pg_query(): Query failed: ERROR:  current transaction is aborted, commands ignored until end of transaction block in /var/www/test/includes/db/DatabasePostgres.php on line 559
Set $wgShowExceptionDetails = true; in LocalSettings.php to show detailed debugging information.
Segmentation fault
Comment 5 NSK Nikolaos S. Karastathis 2008-11-06 16:46:57 UTC
also no search: 
Warning: pg_query() [function.pg-query]: Query failed: ERROR: text search configuration "default" does not exist in /var/www/test/includes/db/DatabasePostgres.php on line 559
Sorry, that was not a valid search string. Please go back and try again
Comment 6 Brad Jorsch 2008-11-06 17:01:00 UTC
To fix the error with the search (and possibly some of the others), connect to your wiki database and issue the following command:

  create text search configuration pg_catalog.default ( COPY=english );

You could also use any language returned by the query "select * from pg_ts_config" if English isn't your preference.
Comment 7 Greg Sabino Mullane 2008-11-20 13:34:08 UTC
Is there anything in the web server logs for the failed 1.14 install?
Comment 8 Greg Sabino Mullane 2008-11-22 06:42:27 UTC
The installation problem should be fixed as of r43843 and r43844. It may also fix some of the other issues.
Comment 9 Greg Sabino Mullane 2008-11-22 06:45:12 UTC
Tweaked the conversion script in r43845 to add CASCADE back in.
Comment 10 Tim Starling 2009-01-08 09:22:27 UTC
If it's fixed, then close the bug. I need to do a release of 1.14. 
Comment 11 Tim Starling 2009-02-07 03:01:08 UTC
Works for me.

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


Navigation
Links