5 * Install, update and uninstall functions for the advagg_ext_minify module.
9 * Implements hook_requirements().
11 function advagg_ext_minify_requirements($phase) {
14 if ($phase == 'runtime') {
16 // Check that php's shell_exec works. `ls` is pretty cross-platform.
17 // Older Windows may not have it though so try `dir` as a backup.
18 if (!@shell_exec('ls') && !@shell_exec('dir')) {
19 $requirements['advagg_ext_min_shell_exec'] = [
20 'title' => t('PHP shell_exec'),
21 'severity' => REQUIREMENT_ERROR,
22 'description' => t('PHP shell_exec is non-functional. Check php.ini for safemode or <a href="@link" target="_blank">disable_functions</a>.', [
23 '@link' => 'http://php.net/manual/en/ini.core.php#ini.disable-functions',
29 $requirements['advagg_ext_min_shell_exec'] = [
30 'title' => t('PHP shell_exec'),
31 'severity' => REQUIREMENT_OK,
32 'description' => t('Enabled'),