Last modified: 2010-05-15 15:41:17 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 T8807, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6807 - Dash in username causes error in postgres query during installation
Dash in username causes error in postgres query during installation
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.7.x
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2006-07-24 20:48 UTC by Sepp Wijnands
Modified: 2010-05-15 15:41 UTC (History)
1 user (show)

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


Attachments

Description Sepp Wijnands 2006-07-24 20:48:30 UTC
The following error pops-up when trying to install a wiki on a server with a
postgresql db and 'iperform-wiki' as db username.

---
Setting the search path for user iperform-wiki ...
Warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or
near "-" at character 20 in /wiki/includes/DatabasePostgres.php on line 138
FAILED.
---

Changing the sql statement:
/wiki/includes/DatabasePostgres.php line 138:

$SQL = "ALTER USER $user SET search_path = $path";
$result = pg_query($this->mConn, $SQL);

to:

$SQL = "ALTER USER \"$user\" SET search_path = $path";
$result = pg_query($this->mConn, $SQL);

Seems to fix the problem (using single quotes seems to cause problems also).
Comment 1 Greg Sabino Mullane 2006-07-24 22:17:19 UTC
Fixed in svn, thanks for the report.

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


Navigation
Links