Skip to content

Commit 2c5ecc7

Browse files
author
Ankur Kaneria
committedOct 15, 2015
MAGETWO-44112: [php7]*.htaccess incompatibility with php 7
- Added section to check for php7 module
1 parent 1d97cd9 commit 2c5ecc7

File tree

5 files changed

+98
-0
lines changed

5 files changed

+98
-0
lines changed
 

‎.htaccess

+26
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,32 @@
5858

5959
</IfModule>
6060

61+
<IfModule mod_php7.c>
62+
63+
############################################
64+
## adjust memory limit
65+
66+
php_value memory_limit 768M
67+
php_value max_execution_time 18000
68+
69+
############################################
70+
## disable automatic session start
71+
## before autoload was initialized
72+
73+
php_flag session.auto_start off
74+
75+
############################################
76+
## enable resulting html compression
77+
78+
#php_flag zlib.output_compression on
79+
80+
###########################################
81+
## disable user agent verification to not break multiple image upload
82+
83+
php_flag suhosin.session.cryptua off
84+
85+
</IfModule>
86+
6187
<IfModule mod_security.c>
6288
###########################################
6389
## disable POST processing to not break multiple image upload

‎dev/tests/functional/.htaccess

+37
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,43 @@
6363

6464
</IfModule>
6565

66+
<IfModule mod_php7.c>
67+
68+
############################################
69+
## adjust memory limit
70+
71+
# php_value memory_limit 64M
72+
php_value memory_limit 256M
73+
php_value max_execution_time 18000
74+
75+
############################################
76+
## disable magic quotes for php request vars
77+
78+
php_flag magic_quotes_gpc off
79+
80+
############################################
81+
## disable automatic session start
82+
## before autoload was initialized
83+
84+
php_flag session.auto_start off
85+
86+
############################################
87+
## enable resulting html compression
88+
89+
#php_flag zlib.output_compression on
90+
91+
###########################################
92+
# disable user agent verification to not break multiple image upload
93+
94+
php_flag suhosin.session.cryptua off
95+
96+
###########################################
97+
# turn off compatibility with PHP4 when dealing with objects
98+
99+
php_flag zend.ze1_compatibility_mode Off
100+
101+
</IfModule>
102+
66103
<IfModule mod_security.c>
67104
###########################################
68105
# disable POST processing to not break multiple image upload

‎pub/.htaccess

+26
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,32 @@
5757

5858
</IfModule>
5959

60+
<IfModule mod_php7.c>
61+
62+
############################################
63+
## adjust memory limit
64+
65+
php_value memory_limit 256M
66+
php_value max_execution_time 18000
67+
68+
############################################
69+
## disable automatic session start
70+
## before autoload was initialized
71+
72+
php_flag session.auto_start off
73+
74+
############################################
75+
## enable resulting html compression
76+
77+
#php_flag zlib.output_compression on
78+
79+
###########################################
80+
# disable user agent verification to not break multiple image upload
81+
82+
php_flag suhosin.session.cryptua off
83+
84+
</IfModule>
85+
6086
<IfModule mod_security.c>
6187
###########################################
6288
# disable POST processing to not break multiple image upload

‎pub/media/.htaccess

+5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
Options All -Indexes
2+
23
<IfModule mod_php5.c>
34
php_flag engine 0
45
</IfModule>
56

7+
<IfModule mod_php7.c>
8+
php_flag engine 0
9+
</IfModule>
10+
611
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
712
Options -ExecCGI
813

‎pub/static/.htaccess

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
php_flag engine 0
33
</IfModule>
44

5+
<IfModule mod_php7.c>
6+
php_flag engine 0
7+
</IfModule>
8+
59
# To avoid situation when web server automatically adds extension to path
610
Options -MultiViews
711

0 commit comments

Comments
 (0)
Please sign in to comment.