Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
php
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eric Zillmann
php
Commits
1b862162
Commit
1b862162
authored
8 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Generalize PHP config
parent
5bf2efa0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
defaults/main.yml
+34
-11
34 additions, 11 deletions
defaults/main.yml
tasks/php.yml
+18
-26
18 additions, 26 deletions
tasks/php.yml
templates/etc-php5-conf-d-opcache.ini
+3
-0
3 additions, 0 deletions
templates/etc-php5-conf-d-opcache.ini
with
55 additions
and
37 deletions
defaults/main.yml
+
34
−
11
View file @
1b862162
php_called_from_apache
:
false
php_needs_oci8
:
false
php_conf_dir
:
'
conf.d'
php_repositories
:
[]
php_packages
:
-
php-apc
-
php-pear
-
php-soap
-
php5
-
php5-cgi
-
php5-curl
-
php5-dev
-
php5-fpm
-
php5-gd
-
php5-imagick
-
php5-imap
-
php5-mcrypt
-
php5-mysql
-
php5-xdebug
-
php5-xmlrpc
-
imagemagick
php_allow_call_time_pass_reference
:
'
on'
php_
max_execution_time
:
'
30'
php_
max_input_vars
:
'
1000
'
php_
memory_limit
:
'
32M
'
php_
browscap
:
false
php_
conf_dir
:
'
conf.d
'
php_
date_timezone
:
'
Europe/Berlin
'
php_display_errors
:
'
Off'
php_display_startup_errors
:
'
Off'
php_error_reporting
:
'
E_ALL
&
~E_NOTICE'
php_expose_php
:
'
Off'
php_filter_default
:
'
unsafe_raw'
php_html_errors
:
'
Off'
php_log_errors
:
'
On'
php_magic_quotes_gpc
:
'
On'
php_max_execution_time
:
'
30'
php_max_input_vars
:
'
1000'
php_memory_limit
:
'
32M'
php_needs_oci8
:
false
php_post_max_size
:
'
32M'
php_upload_max_filesize
:
'
2M'
php_date_timezone
:
'
Europe/Berlin'
php_register_globals
:
'
Off'
php_register_long_arrays
:
'
On'
php_sendmail_path
:
'
'
php_session_cache_expire
:
'
180'
php_session_cookie_lifetime
:
'
0'
php_session_gc_divisor
:
'
1000'
php_session_gc_maxlifetime
:
'
1440'
php_session_cache_expire
:
'
180'
php_expose_php
:
'
Off'
php_browscap
:
false
php_sendmail_path
:
'
'
php_short_open_tag
:
'
Off'
php_upload_max_filesize
:
'
2M'
# apc.ini
apc_rfc1867
:
'
1'
...
...
@@ -32,6 +51,10 @@ apc_shm_size: '256M'
apc_shm_segments
:
'
1'
apc_num_files_hint
:
'
0'
# opcache.ini
opcache_memory_consumption
:
'
128'
opcache_max_accelerated_files
:
'
10000'
# php 5.3
php53
:
libraries
:
...
...
This diff is collapsed.
Click to expand it.
tasks/php.yml
+
18
−
26
View file @
1b862162
---
# file: roles/php/tasks/php.yml
-
name
:
"
PHP
|
Apt
Repository"
apt_repository
:
repo='{{ item }}'
state='present'
with_items
:
'
{{
php_repositories
}}'
-
name
:
"
PHP
|
Install
required
packages."
apt
:
pkg={{ item }}
state=installed
with_items
:
-
php5
-
php-apc
-
php-soap
-
php5-cgi
-
php5-mysql
-
php5-xmlrpc
-
php5-gd
-
php5-imagick
-
php5-mcrypt
-
php5-imap
-
php5-curl
-
php5-xdebug
-
php5-dev
-
php-pear
-
imagemagick
with_items
:
'
{{
php_packages
}}'
notify
:
-
"
PHP
|
Restart
Apache"
-
name
:
"
PHP
|
Enable
Apache
modules"
apache2_module
:
name={{ item }}
state=present
with_items
:
-
fcgid
when
:
not php_called_from_apache
notify
:
"
PHP
|
Restart
Apache"
-
name
:
"
PHP
|
Configuration
file,
php.ini"
template
:
src=etc-php5-apache2-php.ini
...
...
@@ -73,6 +55,16 @@
notify
:
-
"
PHP
|
Restart
Apache"
-
name
:
"
PHP
|
Cache
configuration
file,
opcache.ini"
template
:
src=etc-php5-conf-d-opcache.ini
dest=/etc/php5/{{ php_conf_dir }}/opcache.ini
owner=root
group=root
mode=0644
notify
:
-
"
PHP
|
Restart
Apache"
-
name
:
"
PHP
|
Create
extra
directory
for
browscap"
file
:
dest=/etc/php5/apache2/extra
...
...
@@ -87,7 +79,7 @@
dest=/etc/php5/apache2/extra/browscap.ini
owner=root
group=root
when
:
not php_called_from_apache and
php_browscap
when
:
php_browscap
notify
:
-
"
PHP
|
Restart
Apache"
...
...
This diff is collapsed.
Click to expand it.
templates/etc-php5-conf-d-opcache.ini
0 → 100644
+
3
−
0
View file @
1b862162
zend_extension
=
opcache.so
opcache.memory_consumption
=
{{ opcache_memory_consumption }}
opcache.max_accelerated_files
=
{{ opcache_max_accelerated_files }}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment