@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.

Issue setup guidance recommending MySQLi and MySQL Native Driver

Summary:
Fixes T12994. We need `MYSQLI_ASYNC` to implement client-side query timeouts, and we need MySQLi + MySQL Native Driver to get `MYSQLI_ASYNC`.

Recommend users install MySQLi and MySQL Native Driver if they don't have them. These are generally the defaults and best practice anyway, but Ubuntu makes it easy to use the older stuff.

All the cases we're currently aware of stem from `apt-get install php5-mysql` (which explicitly selects the non-native driver) so issue particular guidance about `php5-mysqlnd`.

Test Plan:
- Faked both issues locally, reviewed the text.
- Will deploy to `secure`, which currently has the non-native driver.

Maniphest Tasks: T12994

Differential Revision: https://secure.phabricator.com/D19216

+50 -5
+2 -2
resources/celerity/map.php
··· 46 46 'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4', 47 47 'rsrc/css/application/config/config-options.css' => '4615667b', 48 48 'rsrc/css/application/config/config-template.css' => '8f18fa41', 49 - 'rsrc/css/application/config/setup-issue.css' => '7dae7f18', 49 + 'rsrc/css/application/config/setup-issue.css' => '30ee0173', 50 50 'rsrc/css/application/config/unhandled-exception.css' => '4c96257a', 51 51 'rsrc/css/application/conpherence/color.css' => 'abb4c358', 52 52 'rsrc/css/application/conpherence/durable-column.css' => '89ea6bef', ··· 881 881 'releeph-preview-branch' => 'b7a6f4a5', 882 882 'releeph-request-differential-create-dialog' => '8d8b92cd', 883 883 'releeph-request-typeahead-css' => '667a48ae', 884 - 'setup-issue-css' => '7dae7f18', 884 + 'setup-issue-css' => '30ee0173', 885 885 'sprite-login-css' => '396f3c3a', 886 886 'sprite-tokens-css' => '9cdfd599', 887 887 'syntax-default-css' => '9923583c',
+1 -1
scripts/install/install_ubuntu.sh
··· 45 45 sudo apt-get -qq update 46 46 sudo apt-get install \ 47 47 $GIT mysql-server apache2 dpkg-dev \ 48 - php5 php5-mysql php5-gd php5-dev php5-curl php-apc php5-cli php5-json 48 + php5 php5-mysqlnd php5-gd php5-dev php5-curl php-apc php5-cli php5-json 49 49 50 50 # Enable mod_rewrite 51 51 sudo a2enmod rewrite
+45
src/applications/config/check/PhabricatorPHPConfigSetupCheck.php
··· 67 67 ->addPHPConfig('always_populate_raw_post_data'); 68 68 } 69 69 70 + if (!extension_loaded('mysqli')) { 71 + $summary = pht( 72 + 'Install the MySQLi extension to improve database behavior.'); 73 + 74 + $message = pht( 75 + 'PHP is currently using the very old "mysql" extension to interact '. 76 + 'with the database. You should install the newer "mysqli" extension '. 77 + 'to improve behaviors (like error handling and query timeouts).'. 78 + "\n\n". 79 + 'Phabricator will work with the older extension, but upgrading to the '. 80 + 'newer extension is recommended.'. 81 + "\n\n". 82 + 'You may be able to install the extension with a command like: %s', 83 + 84 + // NOTE: We're intentionally telling you to install "mysqlnd" here; on 85 + // Ubuntu, there's no separate "mysqli" package. 86 + phutil_tag('tt', array(), 'sudo apt-get install php5-mysqlnd')); 87 + 88 + $this->newIssue('php.mysqli') 89 + ->setName(pht('MySQLi Extension Not Available')) 90 + ->setSummary($summary) 91 + ->setMessage($message); 92 + } else if (!defined('MYSQLI_ASYNC')) { 93 + $summary = pht( 94 + 'Configure the MySQL Native Driver to improve database behavior.'); 95 + 96 + $message = pht( 97 + 'PHP is currently using the older MySQL external driver instead of '. 98 + 'the newer MySQL native driver. The older driver lacks options and '. 99 + 'features (like support for query timeouts) which allow Phabricator '. 100 + 'to interact better with the database.'. 101 + "\n\n". 102 + 'Phabricator will work with the older driver, but upgrading to the '. 103 + 'native driver is recommended.'. 104 + "\n\n". 105 + 'You may be able to install the native driver with a command like: %s', 106 + phutil_tag('tt', array(), 'sudo apt-get install php5-mysqlnd')); 107 + 108 + 109 + $this->newIssue('php.myqlnd') 110 + ->setName(pht('MySQL Native Driver Not Available')) 111 + ->setSummary($summary) 112 + ->setMessage($message); 113 + } 114 + 70 115 } 71 116 72 117 }
+1 -1
src/docs/user/installation_guide.diviner
··· 123 123 - MySQL Server (usually "mysqld" or "mysql-server") 124 124 - PHP (usually "php") 125 125 - Required PHP extensions: mbstring, iconv, mysql (or mysqli), curl, pcntl 126 - (these might be something like "php-mysql" or "php5-mysql") 126 + (these might be something like "php-mysql" or "php5-mysqlnd") 127 127 - Optional PHP extensions: gd, apc (special instructions for APC are available 128 128 below if you have difficulty installing it), xhprof (instructions below, 129 129 you only need this if you are developing Phabricator)
+1 -1
webroot/rsrc/css/application/config/setup-issue.css
··· 84 84 } 85 85 86 86 .setup-issue-body { 87 - padding: 16px 16px 0 16px; 87 + padding: 16px; 88 88 } 89 89 90 90 .setup-issue-status {