Skip to content

Commit

Permalink
MAGETWO-33027: [GITHUB] Installation Incomplete with XDebug enabled #904
Browse files Browse the repository at this point in the history


- fixed issue
- implemented unified output format for failed setting check
  • Loading branch information
Ivan Gavryshko committed Mar 26, 2015
1 parent 8a5f359 commit 5ca032d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 30 deletions.
26 changes: 21 additions & 5 deletions setup/src/Magento/Setup/Controller/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,19 @@ private function checkRawPost()
$error = true;
}

$message = sprintf(
'Your PHP Version is %s, but always_populate_raw_post_data = %d.
$HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will stop the installer from running.
Please open your php.ini file and set always_populate_raw_post_data to -1.
If you need more help please call your hosting provider.
',
PHP_VERSION,
ini_get('always_populate_raw_post_data')
);

$data['rawpost'] = [
'version' => PHP_VERSION,
'ini' => ini_get('always_populate_raw_post_data'),
'message' => $message,
'helpUrl' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data',
'error' => $error
];

Expand All @@ -216,12 +226,18 @@ private function checkXDebugNestedLevel()
$minimumRequiredXDebugNestedLevel = $this->phpInformation->getRequiredMinimumXDebugNestedLevel();

if ($minimumRequiredXDebugNestedLevel > $currentXDebugNestingLevel) {
$error = true;
$error = false;
}

$message = sprintf(
'Magento2 requires xdebug.max_nesting_level to be set %d or more,
but it set xdebug.max_nesting_level=%d.',
$minimumRequiredXDebugNestedLevel,
$currentXDebugNestingLevel
);

$data['xdebug_max_nesting_level'] = [
'currentLevel' => $currentXDebugNestingLevel,
'requiredLevel' => $minimumRequiredXDebugNestedLevel,
'message' => $message,
'error' => $error
];
}
Expand Down
30 changes: 5 additions & 25 deletions setup/view/magento/setup/readiness-check/progress.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -112,37 +112,17 @@
<span class="readiness-check-icon icon-failed-round"></span>
<h3 class="readiness-check-title">PHP Settings Check</h3>

<div ng-show="settings.data.rawpost.error">
<div class="rediness-check-side">
<div ng-repeat="setting in settings.data">
<div ng-show="setting.error && setting.helpUrl" class="rediness-check-side">
<p class="side-title">Need Help?</p>
<a href="http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data" target="_blank">PHP Documentation</a>
</div>
<div class="readiness-check-content">

<p>
Your PHP Version is {{settings.data.rawpost.version}}, but always_populate_raw_post_data = {{settings.data.rawpost.ini}}.
<a href="#php-settings" ng-click="updateOnExpand(settings)">
<span ng-hide="settings.expanded">Show detail</span>
<span ng-show="settings.expanded">Hide detail</span>
</a>
</p>
<p ng-show="settings.expanded">
$HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will stop the installer from running.
Please open your php.ini file and set always_populate_raw_post_data to -1.
</p>
<p ng-show="settings.expanded">If you need more help please call your hosting provider.</p>
<a href="{{setting.helpUrl}}" target="_blank">PHP Documentation</a>
</div>
</div>

<div ng-show="settings.data.xdebug_max_nesting_level.error">
<div class="readiness-check-content">
<div ng-show="setting.error" class="readiness-check-content">
<p>
Magento2 requires xdebug.max_nesting_level to be set {{settings.data.xdebug_max_nesting_level.requiredLevel}} or more,
but it set xdebug.max_nesting_level={{settings.data.xdebug_max_nesting_level.currentLevel}}.
{{setting.message}}
</p>
</div>
</div>

</div>

</div>
Expand Down

0 comments on commit 5ca032d

Please sign in to comment.