View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
17423 | Bug reports | Installation | public | 2021-07-08 07:31 | 2021-07-29 10:10 |
Reporter | gaelrayot | Assigned To | galads | ||
Priority | none | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 5.x | ||||
Summary | 17423: Unable to use a custom DB port | ||||
Description | During the install, in the wizard, when configuring the DB, if a port is set in the DB location field, the connection to the database fail. | ||||
Steps To Reproduce | put localhost:5432 in the DB location field to test with a postgres DB. Fail with a MySQL DB also. | ||||
Additional Information | Looking in application/models/InstallerConfigForm.php, the function getDbPort return the port but does not remove it from the host, leading the DSN construct to return host=localhost:5432;port:5432 instead of host=localhost;port:5432. | ||||
Tags | No tags attached. | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 4.4.10 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | Postgresql13 | ||||
Server OS (if known) | Debian | ||||
Webserver software & version (if known) | |||||
PHP Version | 7.4 | ||||
Here is a fix for application/models/InstallerConfigForm.php file. installer.patch (744 bytes)
@@ -47,6 +47,8 @@ public $dbtype; /** @var string $dblocation */ public $dblocation = 'localhost'; + /** @var string $dbport */ + public $dbport; /** @var string $dbname */ public $dbname; @@ -570,10 +572,11 @@ if (strpos($this->dblocation, ':') !== false) { $pieces = explode(':', $this->dblocation, 2); if (isset($pieces[1]) && is_numeric($pieces[1])) { - return $pieces[1]; + $this->dblocation = str_replace(":" . $pieces[1], "", $this->dblocation); + $this->dbport = $pieces[1]; } } - return $this->getDbDefaultPort(); + return $this->dbport ?? $this->getDbDefaultPort(); } /** |
|
Can you do a PR on github for this, perhaps? |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=32405 |
|
Fixed and merged |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2021-07-08 07:31 | gaelrayot | New Issue | |
2021-07-08 09:30 | galads | Assigned To | => galads |
2021-07-08 09:30 | galads | Status | new => ready for testing |
2021-07-19 11:43 | gaelrayot | Note Added: 65509 | |
2021-07-19 11:43 | gaelrayot | File Added: installer.patch | |
2021-07-22 12:49 | galads | Status | ready for testing => confirmed |
2021-07-22 17:58 | ollehar | Note Added: 65580 | |
2021-07-23 13:13 | gaelrayot | Note Added: 65594 | |
2021-07-28 12:27 | Changeset attached | => LimeSurvey master 1c4a45ab | |
2021-07-28 12:27 | guest | Note Added: 65672 | |
2021-07-29 10:09 | galads | Sync to Zoho Project | => |Yes| |
2021-07-29 10:10 | galads | Note Added: 65726 | |
2021-07-29 10:10 | galads | Status | confirmed => closed |
2021-07-29 10:10 | galads | Resolution | open => fixed |