Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit 1f16757

Browse files
committed
Merge pull request #39 from castiron/gb/better-dev-defaults
Make .ini defaults a little bit more forgiving
2 parents 3b3f541 + dfd27e6 commit 1f16757

File tree

9 files changed

+23
-15
lines changed

9 files changed

+23
-15
lines changed

spec/fixtures/nginx.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,9 @@ server {
2222
fastcgi_pass unix:/test/boxen/data/project-sockets/testproject;
2323
fastcgi_param SCRIPT_FILENAME /Users/testuser/src/testproject/www/index.php;
2424
fastcgi_param PATH_INFO $fastcgi_script_name;
25+
26+
fastcgi_read_timeout 3600s;
27+
client_body_timeout 3600s;
28+
send_timeout 3600s;
2529
}
2630
}

spec/fixtures/php-fpm-pool-custom.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ ping.path = /ping
159159
; does not stop script execution for some reason. A value of '0' means 'off'.
160160
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
161161
; Default Value: 0
162-
request_terminate_timeout = 60s
162+
request_terminate_timeout = 3600s
163163

164164
; The timeout for serving a single request after which a PHP backtrace will be
165165
; dumped to the 'slowlog' file. A value of '0s' means 'off'.

spec/fixtures/php-fpm-pool.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ ping.path = /ping
159159
; does not stop script execution for some reason. A value of '0' means 'off'.
160160
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
161161
; Default Value: 0
162-
request_terminate_timeout = 60s
162+
request_terminate_timeout = 3600s
163163

164164
; The timeout for serving a single request after which a PHP backtrace will be
165165
; dumped to the 'slowlog' file. A value of '0s' means 'off'.

spec/fixtures/php.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ expose_php = On
437437
; Maximum execution time of each script, in seconds
438438
; http://php.net/max-execution-time
439439
; Note: This directive is hardcoded to 0 for the CLI SAPI
440-
max_execution_time = 30
440+
max_execution_time = 3600
441441

442442
; Maximum amount of time each script may spend parsing request data. It's a good
443443
; idea to limit this time on productions servers in order to eliminate unexpectedly
@@ -447,15 +447,15 @@ max_execution_time = 30
447447
; Development Value: 60 (60 seconds)
448448
; Production Value: 60 (60 seconds)
449449
; http://php.net/max-input-time
450-
max_input_time = 60
450+
max_input_time = 3600
451451

452452
; Maximum input variable nesting level
453453
; http://php.net/max-input-nesting-level
454454
;max_input_nesting_level = 64
455455

456456
; Maximum amount of memory a script may consume (128MB)
457457
; http://php.net/memory-limit
458-
memory_limit = 128M
458+
memory_limit = 256M
459459

460460
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
461461
; Error handling and logging ;
@@ -877,7 +877,7 @@ file_uploads = On
877877

878878
; Maximum allowed size for uploaded files.
879879
; http://php.net/upload-max-filesize
880-
upload_max_filesize = 2M
880+
upload_max_filesize = 50M
881881

882882
; Maximum number of files that can be uploaded via a single request
883883
max_file_uploads = 20
@@ -905,7 +905,7 @@ allow_url_include = Off
905905

906906
; Default timeout for socket based streams (seconds)
907907
; http://php.net/default-socket-timeout
908-
default_socket_timeout = 60
908+
default_socket_timeout = 3600
909909

910910
; If your scripts have to deal with files from Macintosh systems,
911911
; or you are running on a Mac and need to deal with files from

spec/fixtures/xdebug.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ zend_extension=/test/boxen/phpenv/versions/5.4.17/modules/xdebug.so
22

33
xdebug.file_link_format="txmt://open?url=file://%f&line=%1"
44
xdebug.remote_enable = On
5-
xdebug.remote_autostart = 1
5+
xdebug.remote_autostart = 0
66
xdebug.max_nesting_level = 300

templates/extensions/xdebug.ini.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ zend_extension=<%= @module_path %>
22

33
xdebug.file_link_format="txmt://open?url=file://%f&line=%1"
44
xdebug.remote_enable = On
5-
xdebug.remote_autostart = 1
5+
xdebug.remote_autostart = 0
66
xdebug.max_nesting_level = 300

templates/nginx/nginx.conf.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,9 @@ server {
2222
fastcgi_pass unix:<%= scope.lookupvar "boxen::config::socketdir" %>/<%= @name %>;
2323
fastcgi_param SCRIPT_FILENAME <%= @repo_dir %>/www/index.php;
2424
fastcgi_param PATH_INFO $fastcgi_script_name;
25+
26+
fastcgi_read_timeout 3600s;
27+
client_body_timeout 3600s;
28+
send_timeout 3600s;
2529
}
2630
}

templates/php-fpm-pool.conf.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ ping.path = /ping
159159
; does not stop script execution for some reason. A value of '0' means 'off'.
160160
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
161161
; Default Value: 0
162-
request_terminate_timeout = 60s
162+
request_terminate_timeout = 3600s
163163

164164
; The timeout for serving a single request after which a PHP backtrace will be
165165
; dumped to the 'slowlog' file. A value of '0s' means 'off'.

templates/php.ini.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ expose_php = On
437437
; Maximum execution time of each script, in seconds
438438
; http://php.net/max-execution-time
439439
; Note: This directive is hardcoded to 0 for the CLI SAPI
440-
max_execution_time = 30
440+
max_execution_time = 3600
441441

442442
; Maximum amount of time each script may spend parsing request data. It's a good
443443
; idea to limit this time on productions servers in order to eliminate unexpectedly
@@ -447,15 +447,15 @@ max_execution_time = 30
447447
; Development Value: 60 (60 seconds)
448448
; Production Value: 60 (60 seconds)
449449
; http://php.net/max-input-time
450-
max_input_time = 60
450+
max_input_time = 3600
451451

452452
; Maximum input variable nesting level
453453
; http://php.net/max-input-nesting-level
454454
;max_input_nesting_level = 64
455455

456456
; Maximum amount of memory a script may consume (128MB)
457457
; http://php.net/memory-limit
458-
memory_limit = 128M
458+
memory_limit = 256M
459459

460460
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
461461
; Error handling and logging ;
@@ -877,7 +877,7 @@ file_uploads = On
877877

878878
; Maximum allowed size for uploaded files.
879879
; http://php.net/upload-max-filesize
880-
upload_max_filesize = 2M
880+
upload_max_filesize = 50M
881881

882882
; Maximum number of files that can be uploaded via a single request
883883
max_file_uploads = 20
@@ -905,7 +905,7 @@ allow_url_include = Off
905905

906906
; Default timeout for socket based streams (seconds)
907907
; http://php.net/default-socket-timeout
908-
default_socket_timeout = 60
908+
default_socket_timeout = 3600
909909

910910
; If your scripts have to deal with files from Macintosh systems,
911911
; or you are running on a Mac and need to deal with files from

0 commit comments

Comments
 (0)