![]() I guess i could just restart php-fpm every two seconds but this is not even funny, actually. And file upload actually works within these seconds (but requires a lot of dexterity.).Īccording to service php7.0-fpm status output, main service process does not restart within this period, and worker process PID's remain unchanged.Īlso, enabling catch_workers_output = yes in How can i extend file upload limit for longer period than two seconds? After one or two seconds it resets back to 2M. I've also found that configuration is correct just after sudo service php7.0-fpm restart: Set memorylimit to amount of memory needed for the php script to run and maxexecutiontime to the time in seconds. ![]() set uploadmaxfilesize to the maximum size of file which need to be uploaded. Setting the PHP upload limit higher than the Max listed. So, it uses the correct php.ini file but ignores its content? The uploadmaxfilesize and the postmaxsize settings in the php.ini need to changed to support larger files than the php default allowed size. The above settings change your PHP upload limit, allowing you to upload files up to 50MB in size. Loaded Configuration File /etc/php/7.0/fpm/php.ini Setting this with iniset() doesn't seem to have any effect. Your code will still have to deal with the naming issues. I've added this file into public directory: Ĭonfiguration File (php.ini) Path /etc/php/7.0/fpm Alternatively, set the PHP configuration value in PHP.INI: maxfileuploads 1 If you do this, PHP will ignore the second and subsequent files. Ssl_certificate_key /etc/ssl/private/***.key įastcgi_pass unix:/run/php/ įastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name Nginx config: cat /etc/nginx/sites-available/bookstack Php config (and there is only one version installed): cat /etc/php/7.0/fpm/php.ini | egrep 'upload_max_filesize|post_max_size' No tweaks in the bookstack backend required. īookstack documentation says it's enough to set up file size limits in both nginx and php (actually it also mentions some tweak in frontend, but since we have HTTP error let's leave it out of scope). And this is my problem for today.įile upload attempt results in HTTP/1.1 422 Unprocessable Entity Unfortunately i can't upload any file bigger than 2M. ![]() I am running a bookstack instance in php under nginx.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |