@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add explicit `mysql.port` configuration

See: https://github.com/facebook/phabricator/pull/356

Reviewed by: epriestley

authored by

Levi Jackson and committed by
epriestley
d27e7c52 a0084bbb

+28 -3
+4 -3
conf/default.conf.php
··· 170 170 // The password to use when connecting to MySQL. 171 171 'mysql.pass' => '', 172 172 173 - // The MySQL server to connect to. If you want to connect to a different 174 - // port than the default (which is 3306), specify it in the hostname 175 - // (e.g., db.example.com:1234). 173 + // The MySQL server to connect to. 176 174 'mysql.host' => 'localhost', 175 + 176 + // If you want to connect to a different port than the default (which is 3306) 177 + 'mysql.port' => '3306', 177 178 178 179 // Phabricator supports PHP extensions MySQL and MySQLi. It is possible to 179 180 // implement also other access mechanism (e.g. PDO_MySQL). The class must
+2
scripts/sql/manage_storage.php
··· 25 25 26 26 $default_user = $conf->getUser(); 27 27 $default_host = $conf->getHost(); 28 + $default_port = $conf->getPort(); 28 29 $default_namespace = PhabricatorLiskDAO::getDefaultStorageNamespace(); 29 30 30 31 try { ··· 82 83 $api->setUser($args->getArg('user')); 83 84 PhabricatorEnv::overrideConfig('mysql.user', $args->getArg('user')); 84 85 $api->setHost($default_host); 86 + $api->setPort($default_port); 85 87 $api->setPassword($password); 86 88 $api->setNamespace($args->getArg('namespace')); 87 89
+3
src/applications/config/check/PhabricatorSetupCheckDatabase.php
··· 12 12 $conn_user = $conf->getUser(); 13 13 $conn_pass = $conf->getPassword(); 14 14 $conn_host = $conf->getHost(); 15 + $conn_port = $conf->getPort(); 15 16 16 17 ini_set('mysql.connect_timeout', 2); 17 18 ··· 19 20 'user' => $conn_user, 20 21 'pass' => $conn_pass, 21 22 'host' => $conn_host, 23 + 'port' => $conn_port, 22 24 'database' => null, 23 25 ); 24 26 ··· 40 42 ->setMessage($message) 41 43 ->setIsFatal(true) 42 44 ->addRelatedPhabricatorConfig('mysql.host') 45 + ->addRelatedPhabricatorConfig('mysql.port') 43 46 ->addRelatedPhabricatorConfig('mysql.user') 44 47 ->addRelatedPhabricatorConfig('mysql.pass'); 45 48 return;
+4
src/applications/config/option/PhabricatorMySQLConfigOptions.php
··· 69 69 "this namespace if you want. Normally, you should not do this ". 70 70 "unless you are developing Phabricator and using namespaces to ". 71 71 "separate multiple sandbox datasets.")), 72 + $this->newOption('mysql.port', 'string', null) 73 + ->setLocked(true) 74 + ->setDescription( 75 + pht("MySQL port to use when connecting to the database.")), 72 76 ); 73 77 } 74 78
+4
src/infrastructure/storage/configuration/DefaultDatabaseConfigurationProvider.php
··· 29 29 return PhabricatorEnv::getEnvConfig('mysql.host'); 30 30 } 31 31 32 + public function getPort() { 33 + return PhabricatorEnv::getEnvConfig('mysql.port'); 34 + } 35 + 32 36 public function getDatabase() { 33 37 if (!$this->getDao()) { 34 38 return null;
+1
src/infrastructure/storage/lisk/PhabricatorLiskDAO.php
··· 110 110 'user' => $conf->getUser(), 111 111 'pass' => $conf->getPassword(), 112 112 'host' => $conf->getHost(), 113 + 'port' => $conf->getPort(), 113 114 'database' => $conf->getDatabase(), 114 115 'retries' => 3, 115 116 ),
+10
src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php
··· 45 45 return $this->host; 46 46 } 47 47 48 + public function setPort($port) { 49 + $this->port = $port; 50 + return $this; 51 + } 52 + 53 + public function getPort() { 54 + return $this->port; 55 + } 56 + 48 57 public function getDatabaseName($fragment) { 49 58 return $this->namespace.'_'.$fragment; 50 59 } ··· 74 83 'user' => $this->user, 75 84 'pass' => $this->password, 76 85 'host' => $this->host, 86 + 'port' => $this->port, 77 87 'database' => $fragment 78 88 ? $database 79 89 : null,