diff --git a/TODO.md b/TODO.md index 06b22d5..3b53bea 100644 --- a/TODO.md +++ b/TODO.md @@ -4,3 +4,4 @@ - [x] Website iframe overlay: remove blur, move button to bottom-right, replace text with SVG icon + tooltip - [x] Fix "Copier" button in logs section scrolling out of view on horizontal scroll - [x] Remove TOC temporary debug error_log calls +- [x] Fix PeerTube upload failure: PHP /tmp tmpfs too small for large video files diff --git a/app/public/admin/actions/filepond/.user.ini b/app/public/admin/actions/filepond/.user.ini new file mode 100644 index 0000000..54e7227 --- /dev/null +++ b/app/public/admin/actions/filepond/.user.ini @@ -0,0 +1,12 @@ +; Bypass /tmp tmpfs (987MB) for large video/audio uploads. +; /tmp defaults to a small tmpfs; this points PHP's upload temp +; directory to the storage partition which has 20GB free. +upload_tmp_dir = /var/www/xamxam/storage/tmp/php-uploads + +; These mirror the nginx fastcgi_param PHP_VALUE overrides +; as a belt-and-suspenders safety net. +upload_max_filesize = 8192M +post_max_size = 8192M +memory_limit = 256M +max_execution_time = 600 +max_input_time = 600 diff --git a/app/public/partage/actions/filepond/.user.ini b/app/public/partage/actions/filepond/.user.ini new file mode 100644 index 0000000..54e7227 --- /dev/null +++ b/app/public/partage/actions/filepond/.user.ini @@ -0,0 +1,12 @@ +; Bypass /tmp tmpfs (987MB) for large video/audio uploads. +; /tmp defaults to a small tmpfs; this points PHP's upload temp +; directory to the storage partition which has 20GB free. +upload_tmp_dir = /var/www/xamxam/storage/tmp/php-uploads + +; These mirror the nginx fastcgi_param PHP_VALUE overrides +; as a belt-and-suspenders safety net. +upload_max_filesize = 8192M +post_max_size = 8192M +memory_limit = 256M +max_execution_time = 600 +max_input_time = 600 diff --git a/nginx/xamxam.conf b/nginx/xamxam.conf index f9d2184..ad6f82b 100644 --- a/nginx/xamxam.conf +++ b/nginx/xamxam.conf @@ -156,7 +156,7 @@ server { fastcgi_pass unix:/var/run/php/php8.4-fpm.sock; # Security parameters (must be <= client_max_body_size) - fastcgi_param PHP_VALUE "upload_max_filesize=8192M \n post_max_size=8192M"; + fastcgi_param PHP_VALUE "upload_max_filesize=8192M \n post_max_size=8192M \n upload_tmp_dir=/var/www/xamxam/storage/tmp/php-uploads"; # Timeouts fastcgi_read_timeout 600; @@ -176,7 +176,7 @@ server { location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php8.4-fpm.sock; - fastcgi_param PHP_VALUE "upload_max_filesize=8192M \n post_max_size=8192M"; + fastcgi_param PHP_VALUE "upload_max_filesize=8192M \n post_max_size=8192M \n upload_tmp_dir=/var/www/xamxam/storage/tmp/php-uploads"; fastcgi_read_timeout 600; fastcgi_send_timeout 600; } @@ -199,7 +199,7 @@ server { fastcgi_param SCRIPT_FILENAME $document_root/index.php; fastcgi_param SCRIPT_NAME /index.php; fastcgi_pass unix:/var/run/php/php8.4-fpm.sock; - fastcgi_param PHP_VALUE "upload_max_filesize=8192M \n post_max_size=8192M"; + fastcgi_param PHP_VALUE "upload_max_filesize=8192M \n post_max_size=8192M \n upload_tmp_dir=/var/www/xamxam/storage/tmp/php-uploads"; fastcgi_read_timeout 600; fastcgi_send_timeout 600; } @@ -220,7 +220,7 @@ server { fastcgi_pass unix:/var/run/php/php8.4-fpm.sock; # Security parameters (must be <= client_max_body_size) - fastcgi_param PHP_VALUE "upload_max_filesize=8192M \n post_max_size=8192M"; + fastcgi_param PHP_VALUE "upload_max_filesize=8192M \n post_max_size=8192M \n upload_tmp_dir=/var/www/xamxam/storage/tmp/php-uploads"; # Timeouts fastcgi_read_timeout 600; diff --git a/scripts/deploy-server.sh b/scripts/deploy-server.sh index e9d187f..4dc818a 100755 --- a/scripts/deploy-server.sh +++ b/scripts/deploy-server.sh @@ -83,6 +83,12 @@ chown -R www-data:xamxam /var/www/xamxam/storage/cache chmod -R 2775 /var/www/xamxam/storage/cache ok "Cache dirs: created and owned by www-data:xamxam" +# Ensure PHP upload temp dir exists on storage partition (not /tmp tmpfs) +mkdir -p /var/www/xamxam/storage/tmp/php-uploads +chown www-data:xamxam /var/www/xamxam/storage/tmp/php-uploads +chmod 2775 /var/www/xamxam/storage/tmp/php-uploads +ok "PHP upload temp dir: /var/www/xamxam/storage/tmp/php-uploads" + # ── Step 2: Nginx config ────────────────────────────────────────────────────── printf "\n📋 Step 2: Deploying nginx configuration...\n" echo "--------------------------------------------"