enable mcyrpt PHP extension for Ubuntu 14.04+

This commit is contained in:
Ralf Becker 2014-06-17 15:50:34 +00:00
parent a2e03406d2
commit 2772e3e342

View File

@ -63,6 +63,7 @@ $config = array(
'folder' => '',
'install-update-app' => '', // install or update a single (non-default) app
'webserver_user'=> 'apache', // required to fix permissions
'php5enmod' => '',
);
// read language from LANG enviroment variable
@ -120,6 +121,11 @@ function set_distro_defaults($distro=null)
$config['start_db'] = '/etc/init.d/mysql';
$config['start_webserver'] = '/etc/init.d/apache2';
}
// enable mcrypt
if (file_exists('/usr/sbin/php5enmod'))
{
$config['php5enmod'] = '/usr/sbin/php5enmod -s ALL mcrypt';
}
$config['autostart_db'] = '/usr/sbin/update-rc.d mysql defaults';
$config['autostart_webserver'] = '/usr/sbin/update-rc.d apache2 defaults';
$config['webserver_user'] = 'www-data';
@ -296,6 +302,11 @@ if (!file_exists($config['header']) || filesize($config['header']) < 200) // def
}
run_cmd($setup_ldap);
}
// enable mcrypt extension eg. for Ubuntu 14.04+
if (!empty($config['php5enmod']))
{
run_cmd($config['php5enmod']);
}
// create header
$setup_header = $setup_cli.' --create-header '.escapeshellarg($config['config_passwd'].','.$config['config_user']).