Skip to content

Commit

Permalink
Add check for mod_php before setting php_value for upload size
Browse files Browse the repository at this point in the history
This will prevent errors on systems that don't allow overriding the php
values from within the .htaccess files. This will only check for php 7+
though, as the mod_php directive is version specific. This is okay for
now, as we officially only support PHP 7.1+
  • Loading branch information
rijkvanzanten committed Apr 15, 2019
1 parent d0a33f4 commit 4286582
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions public/.htaccess
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Comment this line if you are getting: "Option SymLinksIfOwnerMatch not allowed here" error in Apache
Options +SymLinksIfOwnerMatch

php_value upload_max_filesize 50M
php_value post_max_size 100M

# php5_module automatically handles HTTP_AUTHORIZATION headers, but fcgi_module does not.
<IfModule mod_setenvif.c>
<IfModule mod_proxy_fcgi.c>
Expand All @@ -12,7 +9,6 @@ php_value post_max_size 100M
</IfModule>

<ifModule mod_rewrite.c>

RewriteEngine On

# Map all admin endpoints to the admin app (except static files)
Expand All @@ -22,5 +18,9 @@ php_value post_max_size 100M
# Map all other requests to invoke the API router (except static files)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule !^admin index.php?%{QUERY_STRING} [L]

</ifModule>

<IfModule mod_php7.c>
php_value upload_max_filesize 50M
php_value post_max_size 100M
</IfModule>

0 comments on commit 4286582

Please sign in to comment.