Skip to content

Commit

Permalink
Workaround for cURL troubles in container environments
Browse files Browse the repository at this point in the history
  • Loading branch information
nupplaphil committed Mar 27, 2021
1 parent 4b52da8 commit a831242
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Core/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,6 @@ public function checkSmarty3()
*
* @param string $baseurl The baseurl of the app
* @return bool false if something required failed
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function checkHtAccess($baseurl)
{
Expand All @@ -563,14 +562,16 @@ public function checkHtAccess($baseurl)

if ($fetchResult->getReturnCode() != 204) {
$status = false;
$help = DI::l10n()->t('Url rewrite in .htaccess is not working. Make sure you copied .htaccess-dist to .htaccess.');
$help = DI::l10n()->t('Url rewrite in .htaccess seems not working. Make sure you copied .htaccess-dist to .htaccess.');
$help .= DI::l10n()->t('In some circumstances (like running inside containers), you can skip this error.');
$error_msg = [];
$error_msg['head'] = DI::l10n()->t('Error message from Curl when fetching');
$error_msg['url'] = $fetchResult->getRedirectUrl();
$error_msg['msg'] = $fetchResult->getError();
}

$this->addCheck(DI::l10n()->t('Url rewrite is working'), $status, true, $help, $error_msg);
/// @TODO Required false because of cURL issues in containers - see https://github.com/friendica/docker/issues/134
$this->addCheck(DI::l10n()->t('Url rewrite is working'), $status, false, $help, $error_msg);
} else {
// cannot check modrewrite if libcurl is not installed
/// @TODO Maybe issue warning here?
Expand Down

0 comments on commit a831242

Please sign in to comment.