Skip to content
Snippets Groups Projects
Commit b9966c50 authored by jurgenhaas's avatar jurgenhaas
Browse files

Install mcrypt for PHP 7.2

parent 31e1486c
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,7 @@ php_max_file_uploads: 20
php_max_input_time: 60
php_max_input_vars: 1000
php_memory_limit: 32M
php_needs_mcrypt: no
php_needs_msodbc: no
php_needs_oci8: no
php_output_buffering: 4096
......
---
# file: roles/php/tasks/mcrypt-7.2.yml
- name: Check MCrypt Requirement
stat:
path: /usr/lib/php/20170718/mcrypt.so
register: mcrypt_file
- block:
- name: Enable MCrypt for PHP
copy:
content: extension={{ item }}.so
dest: /etc/{{ php_base_dir }}/{{ php_conf_dir }}/{{ item }}.ini
owner: root
group: root
mode: 0644
with_items:
- mcrypt
- name: Install packages
apt:
pkg: '{{ packages }}'
state: present
update_cache: yes
vars:
packages:
- libmcrypt-dev
- libreadline-dev
- name: Install PECL packages
shell: pecl install --soft --ignore-errors mcrypt-1.0.1
when: php_version_main|default(7) == 7
ignore_errors: yes
- name: Enable extension
shell: phpenmod {{ item }}
with_items:
- mcrypt
notify:
- Restart Apache
when: not mcrypt_file.stat.exists
......@@ -111,6 +111,10 @@
include_tasks: oci-{{ php_version|default('5.5') }}.yml
when: repository is defined and php_needs_oci8
- name: Include mcrypt
include_tasks: mcrypt-7.2.yml
when: php_version|default('5.5') == '7.2' and php_needs_mcrypt
- name: Import msodbc
import_tasks: msodbc.yml
when: php_needs_msodbc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment