Description of problem: Cannot configure mediawiki to use a postgres database. Version-Release number of selected component (if applicable): mediawiki-1.14.0-45.fc10.x86_64 How reproducible: Every time. Steps to Reproduce: 1. Install mediawiki 2. Mapped the /usr/share/mediawiki directory into the URL address space of /wiki using an alias. 3. Launched a browser at http://servername/wiki and clicked on "configure". 4. Entered in some basic details, changed over to use a postgres database, and clicked "Install Media Wiki" Actual results: * PHP 5.2.6 installed * Found database drivers for: MySQL PostgreSQL * 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/php/session) appears to be valid. * PHP's memory_limit is 32M. * 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: /usr/share/mediawiki * Script URI path: /wiki * 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 "wikidb" as "wikiuser"... error: No database connection * Checking the version of Postgres... Warning: pg_version(): supplied argument is not a valid PostgreSQL link resource in /usr/share/mediawiki/includes/db/DatabasePostgres.php on line 1074 FAILED. Required version is 8.1. You have 7.3 or earlier Expected results: For it to work Additional info: # rpm -qa postgres* postgresql-libs-8.3.7-1.fc10.x86_64 postgresql-python-8.3.7-1.fc10.x86_64 postgresql-8.3.7-1.fc10.x86_64 postgresql-server-8.3.7-1.fc10.x86_64
I'm not sure about the "No database connection" part either. # netstat -nap | grep postmaster tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 1992/postmaster udp 0 0 127.0.0.1:42712 127.0.0.1:42712 ESTABLISHED 1992/postmaster unix 2 [ ACC ] STREAM LISTENING 7420 1992/postmaster /tmp/.s.PGSQL.5432
This may be related to https://bugzilla.wikimedia.org/show_bug.cgi?id=16937 and http://bugs.php.net/bug.php?id=48181
As mentioned in John's bug link, this will be fixed with either mediawiki 1.15.0 or php 5.3 are out. I'm also pinging the EPEL maintainer about the possibility of backporting the fix: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/50473
I'm sorry, I'm actually mistaken, I just confirmed that this is still broken with 1.15.0. I'm looking into it more.
Aaand I'm an idiot, it actually is fixed, sorry for the noise. I'm going to test backporting this to 1.14.0 for EPEL now.
Hey, Austin, I was actually unable to reproduce the problem using the stock mediawiki 1.14.0 tarball on F11. I did get the impression on the upstream bug that most people were reporting this occurring in windows. One instance where I did see the error message that you described was when I an incorrect username, password, or database host in the setup script. Can you still reproduce this problem using information that you have confirmed works using: psql -U userame -h host wikidb I'm setting this to needinfo for so that we can get info for reproducing this.
Austin, have you tested this again? There is also mediawiki 1.15.1 in the repo, which may have fixed this for you.
Sorry for not responding sooner - forgot my account details here. I used mediawiki from the repo, not the tarball. I can re-investigate for F11 shortly, and an F10 system a little later. Still raising the need-info flag, as I've not supplied it yet.
OK, trying again on a (relatively) clean F11 install. Adding to this update as I go: 1. Using mediawiki v1.14.0-45.fc11.i586 (default?) 2. Using Postgres-server v8.3.7-1.fc11.i586 (updated?) 3. # cd /var/www/html; ln -s ../wiki . # To bring it into the web space (no alias this time) 4. Visit http://server/wiki and receive "please setup the wiki first" message. 5. Click link to setup. 6. Enter details, including PostGreSQL DB, account passwords, and include root to setup the DB. 7. Click Install MediaWiki button. 8. Received "Could not connect to database as superuser" message. 9. Check Postgres by running psql as postgres and \du: postgres=# \du List of roles Role name | Superuser | Create role | Create DB | Connections | Member of -----------+-----------+-------------+-----------+-------------+----------- postgres | yes | yes | yes | no limit | {} root | yes | yes | yes | no limit | {} (2 rows) 10. enter confused state. 11. Check top of wiki page, and see: # Database type: PostgreSQL # Loading class: DatabasePostgres # Attempting to connect to database "postgres" as superuser "root"... error: No database connection 12. More confusion - I just connected to check users... # netstat -nap | grep postm tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 3025/postmaster Just noticed that this is an i586 install and not the x86_64 version initially reported, but I don't have access to that system anymore. It's not reporting an incorrect version of Postgres, but it's not working either. Will leave the need-info field marked as a reminder.
OK, ignoring the "I can't do stuff as root" thing it tries to, I decided to create the wikiuser and database and untick the "use superuser" field. root #> createuser -S -D -R -P -E wikiuser Enter password for new role: Enter it again: root #> # createdb -O wikiuser wikidb Re-running the web-installer, I now get: # Database type: PostgreSQL # Loading class: DatabasePostgres # Attempting to connect to database "wikidb" as "wikiuser"... error: No database connection # Checking the version of Postgres... Warning: pg_version(): supplied argument is not a valid PostgreSQL link resource in /usr/share/mediawiki/includes/db/DatabasePostgres.php on line 1074 FAILED. Required version is 8.1. You have 7.3 or earlier What's the "no database connection" thing still hovering about? At least it comes up with the error message as initially reported.
(In reply to comment #9) > OK, trying again on a (relatively) clean F11 install. Adding to this update as > I go: > > 1. Using mediawiki v1.14.0-45.fc11.i586 (default?) We have 1.15.1 in the updates now, can you please try that instead? (You possibly also have no other updates as well) > # Attempting to connect to database "postgres" as superuser "root"... error: No > database connection When this happens, can you try to check what a tcpdump -i any port 5432 reports in another window? > # netstat -nap | grep postm > tcp 0 0 127.0.0.1:5432 0.0.0.0:* > LISTEN 3025/postmaster Just a shot in the dark, did you give localhost/127.0.0.1 as the database server to the mediawiki install or perhaps a non-localhost fqdn/ip? In the latter case the error would be OK, and you would need to connect to localhost, or if you want to multi-tier the setup you need to listen on more than the loopback device.
I've just run into the same issue. In my case the cause was SELinux. In F11 SELinux is configured to prevent httpd from accessing databases by default. Check /var/log/audit/audit.log to see if this is the problem in your case. After adding the appropriate SELinux permission for httpd the configuration process was successful.
Orien, could you quote your SELinux permission configuration? Dan, could we add this to the policy? Thanks!
Orien, did you need to turn on the httpd_can_network_connect_db boolean. setsebool -P httpd_can_network_connect_db 1
Axel, Dan, the only change I made to the default F11 SELinux configuration is to activate the httpd_can_network_connect_db boolean.
This message is a reminder that Fedora 10 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 10. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '10'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 10's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 10 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.