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

Write 500 words on how to restart webservers

Summary:
Fixes T9874.

- Stop using the phrase "restart your webserver". Instead, say "restart Phabricator".
- Write a document explaining that "Restart Phabricator" means to restart all of the server processes, depending on how your configuration is set up, and approximately how to do that.
- Link to this document.
- In places where we are not specifically giving instructions and the user isn't expected to do anything, be intentionally vague so as to avoid being misleading.

Test Plan:
- Read document.
- Hit "exetnsion" and "PHP config" setup checks, got "restart Phabricator" with documentation links in both cases.

Reviewers: chad

Maniphest Tasks: T9874

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

+151 -18
+1 -1
src/applications/auth/provider/PhabricatorJIRAAuthProvider.php
··· 171 171 "The PHP 'openssl' extension is not installed. You must install ". 172 172 "this extension in order to add a JIRA authentication provider, ". 173 173 "because JIRA OAuth requests use the RSA-SHA1 signing algorithm. ". 174 - "Install the 'openssl' extension, restart your webserver, and try ". 174 + "Install the 'openssl' extension, restart Phabricator, and try ". 175 175 "again.")); 176 176 } 177 177
+3 -3
src/applications/cache/spec/PhabricatorOpcodeCacheSpec.php
··· 87 87 'The "%s" setting is currently disabled in your PHP configuration, '. 88 88 'but Phabricator is running in development mode. This option should '. 89 89 'normally be enabled in development so you do not need to restart '. 90 - 'your webserver after making changes to the code.', 90 + 'anything after making changes to the code.', 91 91 'apc.stat'); 92 92 93 93 $this ··· 135 135 136 136 $message = pht( 137 137 'In development, OPcache should be configured to always reload '. 138 - 'code so the webserver does not need to be restarted after making '. 139 - 'changes. To do this, enable "%s" and set "%s" to 0.', 138 + 'code so nothing needs to be restarted after making changes. To do '. 139 + 'this, enable "%s" and set "%s" to 0.', 140 140 'opcache.validate_timestamps', 141 141 'opcache.revalidate_freq'); 142 142
+1 -1
src/applications/config/option/PhabricatorUIConfigOptions.php
··· 85 85 'is true and otherwise view policy user; mismatches in these '. 86 86 'policy settings will result in a broken logo for some users.'. 87 87 "\n\n". 88 - 'You should restart your webserver after updating this value '. 88 + 'You should restart Phabricator after updating this value '. 89 89 'to see this change take effect.'. 90 90 "\n\n". 91 91 'As this feature is experimental, please read [[ %s | T4214 ]] '.
+19 -6
src/applications/config/view/PhabricatorSetupIssueView.php
··· 87 87 "OS X, you might want to try Homebrew."); 88 88 89 89 $restart_info = pht( 90 - 'After installing new PHP extensions, <strong>restart your webserver '. 91 - 'for the changes to take effect</strong>.', 92 - hsprintf('')); 90 + 'After installing new PHP extensions, <strong>restart Phabricator '. 91 + 'for the changes to take effect</strong>. For help with restarting '. 92 + 'Phabricator, see %s in the documentation.', 93 + $this->renderRestartLink()); 93 94 94 95 $description[] = phutil_tag( 95 96 'div', ··· 412 413 'p', 413 414 array(), 414 415 pht( 415 - 'After editing the PHP configuration, <strong>restart your '. 416 - 'webserver for the changes to take effect</strong>.', 417 - hsprintf(''))); 416 + 'After editing the PHP configuration, <strong>restart Phabricator for '. 417 + 'the changes to take effect</strong>. For help with restarting '. 418 + 'Phabricator, see %s in the documentation.', 419 + $this->renderRestartLink())); 418 420 419 421 return phutil_tag( 420 422 'div', ··· 545 547 $link_info, 546 548 $link_list, 547 549 )); 550 + } 551 + 552 + private function renderRestartLink() { 553 + $doc_href = PhabricatorEnv::getDoclink('Restarting Phabricator'); 554 + return phutil_tag( 555 + 'a', 556 + array( 557 + 'href' => $doc_href, 558 + 'target' => '_blank', 559 + ), 560 + pht('Restarting Phabricator')); 548 561 } 549 562 550 563 }
+4 -3
src/docs/user/configuration/advanced_configuration.diviner
··· 107 107 ) 108 108 ``` 109 109 110 - After creating and selecting a configuration file, restart your webserver. Any 111 - configuration you set should take effect immediately, and your file should be 112 - visible in the Config application when examining configuration. 110 + After creating and selecting a configuration file, restart Phabricator (for 111 + help, see @{article:Restarting Phabricator}). Any configuration you set should 112 + take effect immediately, and your file should be visible in the Config 113 + application when examining configuration. 113 114 114 115 = Next Steps = 115 116
+5 -3
src/docs/user/configuration/custom_fields.diviner
··· 170 170 | Projects | @{class:PhabricatorProjectCustomField} | 171 171 172 172 The easiest way to get started is to drop your subclass into 173 - `phabricator/src/extensions/`, which should make it immediately available in the 174 - UI (if you use APC, you may need to restart your webserver). For example, this 175 - is a simple template which adds a custom field to Maniphest: 173 + `phabricator/src/extensions/`. If Phabricator is configured in development 174 + mode, the class should immediately be available in the UI. If not, you can 175 + restart Phabricator (for help, see @{article:Restarting Phabricator}). 176 + 177 + For example, this is a simple template which adds a custom field to Maniphest: 176 178 177 179 name=ExampleManiphestCustomField.php 178 180 <?php
+116
src/docs/user/field/restarting.diviner
··· 1 + @title Restarting Phabricator 2 + @group fieldmanual 3 + 4 + Instructions on how to restart HTTP and PHP servers to reload configuration 5 + changes in Phabricator. 6 + 7 + 8 + Overview 9 + ======== 10 + 11 + Phabricator's setup and configuration instructions sometimes require you to 12 + restart your server processes, particularly after making configuration changes. 13 + This document explains how to restart them properly. 14 + 15 + In general, you need to restart both whatever is serving HTTP requests and 16 + whatever is serving PHP requests. In some cases, these will be the same process 17 + and handled with one restart command. In other cases, they will be two 18 + different processes and handled with two different restart commands. 19 + 20 + {icon exclamation-circle color=blue} If you have two different processes (for 21 + example, nginx and PHP-FPM), you need to issue two different restart commands. 22 + 23 + It's important to restart both your HTTP server and PHP server because each 24 + server caches different configuration and settings. Restarting both servers 25 + after making changes ensures you're running up-to-date configuration. 26 + 27 + To restart properly: 28 + 29 + - Identify which HTTP server you are running (for example, Apache or nginx). 30 + - Identify which PHP server you are running (for example, mod_php or PHP-FPM). 31 + - For each server, follow the instructions below to restart it. 32 + - If the instructions tell you to do so, make sure you restart **both** 33 + servers! 34 + 35 + 36 + Quick Start 37 + =========== 38 + 39 + **Apache**: If you use Apache with `mod_php`, you can just restart Apache. You 40 + do not need to restart `mod_php` separately. See below for instructions on how 41 + to do this if you aren't sure. This is a very common configuration. 42 + 43 + **nginx**: If you use nginx with PHP-FPM, you need to restart both nginx and 44 + PHP-FPM. See below for instructions on how to do this if you aren't sure. This 45 + is also a very common configuration. 46 + 47 + It's possible to use Apache or nginx in other configurations, or a different 48 + webserver. Consult the documentation for your system or webserver if you aren't 49 + sure how things are set up. 50 + 51 + 52 + Universal Restart 53 + ================= 54 + 55 + If you are having trouble properly restarting processes on your server, try 56 + turning it off and on again. This is effective on every known system and 57 + under all configurations. 58 + 59 + 60 + HTTP Server: Apache 61 + =================== 62 + 63 + If you are using Apache with `mod_php`, you only need to restart Apache. 64 + 65 + If you are using Apache in FastCGI mode, you need to restart both Apache and 66 + the FCGI server (usually PHP-FPM). This is very unusual. 67 + 68 + The correct method for restarting Apache depends on what system you are 69 + running. Consult your system documentation for details. You might use a command 70 + like one of these on your system, or a different command: 71 + 72 + ``` 73 + $ sudo apachectl restart 74 + $ sudo /etc/init.d/httpd restart 75 + $ sudo service apache2 restart 76 + ``` 77 + 78 + 79 + HTTP Server: Nginx 80 + ================== 81 + 82 + If you're using Nginx with PHP-FPM, you need to restart both of them. This is 83 + the most common Nginx configuration. 84 + 85 + The correct method for restarting Nginx depends on what system you are running. 86 + Consult your system documentation for details. You might use a command like 87 + one of these on your system, or a different command: 88 + 89 + ``` 90 + $ sudo /etc/init.d/nginx restart 91 + $ sudo service nginx restart 92 + ``` 93 + 94 + 95 + PHP Server: mod_php 96 + =================== 97 + 98 + This is a builtin PHP server that runs within Apache. Restarting Apache (see 99 + above) is sufficient to restart it. There is no separate restart command for 100 + `mod_php`, so you don't need to do anything else. 101 + 102 + 103 + PHP Server: PHP-FPM 104 + =================== 105 + 106 + If you're using FastCGI mode, PHP-FPM is the most common PHP FastCGI server. 107 + You'll need to restart it if you're running it. 108 + 109 + The correct method for restarting PHP-FPM depends on what system you are 110 + running. Consult your system documentation for details. You might use a command 111 + like one of these on your system, or a different command: 112 + 113 + ``` 114 + $ sudo /etc/init.d/php-fpm restart 115 + $ sudo service php5-fpm reload 116 + ```
+2 -1
src/docs/user/upgrading.diviner
··· 51 51 Upgrade Process 52 52 =============== 53 53 54 - IMPORTANT: You **MUST** restart Apache or PHP-FPM after upgrading. 54 + IMPORTANT: You **MUST** restart Phabricator after upgrading. For help, see 55 + @{article:Restarting Phabricator}. 55 56 56 57 IMPORTANT: You **MUST** upgrade `libphutil`, `arcanist` and `phabricator` at 57 58 the same time.