mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 08:30:07 +01:00
Merge pull request #277 from drbyte/fix-413-request-entity-too-large-and-uploads
Fix large-upload problems by setting PHP limits and Nginx max size
This commit is contained in:
@@ -25,6 +25,8 @@ public function tearDown()
|
||||
public function test_fpm_is_configured_with_the_correct_user_group_and_port()
|
||||
{
|
||||
copy(__DIR__.'/files/fpm.conf', __DIR__.'/output/fpm.conf');
|
||||
mkdir(__DIR__.'/output/conf.d');
|
||||
copy(__DIR__.'/files/php-memory-limits.ini', __DIR__.'/output/conf.d/php-memory-limits.ini');
|
||||
resolve(StubForUpdatingFpmConfigFiles::class)->updateConfiguration();
|
||||
$contents = file_get_contents(__DIR__.'/output/fpm.conf');
|
||||
$this->assertContains(sprintf("\nuser = %s", user()), $contents);
|
||||
|
||||
8
tests/files/php-memory-limits.ini
Normal file
8
tests/files/php-memory-limits.ini
Normal file
@@ -0,0 +1,8 @@
|
||||
; Max memory per instance
|
||||
memory_limit = 128M
|
||||
|
||||
;The maximum size of an uploaded file.
|
||||
upload_max_filesize = 128M
|
||||
|
||||
;Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize
|
||||
post_max_size = 128M
|
||||
Reference in New Issue
Block a user