Bilder
This commit is contained in:
parent
b0feb07a62
commit
52ef8feba3
@ -55,6 +55,7 @@ class ToggleShoppingItemRequest extends FormRequest
|
||||
'price_decimal.min' => 'Der Preis darf nicht negativ sein.',
|
||||
'price_decimal.max' => 'Der Preis ist zu gross.',
|
||||
'photo.max' => 'Das Foto darf maximal 15 MB gross sein.',
|
||||
'photo.uploaded' => 'Das Foto konnte nicht hochgeladen werden. Haeufig: Datei zu gross fuer die PHP-Grenze auf dem Server (upload_max_filesize / post_max_size). Bitte ein kleineres Bild waehlen oder die Server-Limits erhoehen (siehe scripts/apache-einkauf-debian-setup.sh, Abschnitt PHP-Uploads).',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -51,6 +51,7 @@ class UpdateShoppingItemRequest extends FormRequest
|
||||
'price_decimal.min' => 'Der Preis darf nicht negativ sein.',
|
||||
'price_decimal.max' => 'Der Preis ist zu gross.',
|
||||
'photo.max' => 'Das Foto darf maximal 15 MB gross sein.',
|
||||
'photo.uploaded' => 'Das Foto konnte nicht hochgeladen werden. Haeufig: Datei zu gross fuer die PHP-Grenze auf dem Server (upload_max_filesize / post_max_size). Bitte ein kleineres Bild waehlen oder die Server-Limits erhoehen (siehe scripts/apache-einkauf-debian-setup.sh, Abschnitt PHP-Uploads).',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
4
html/.user.ini
Normal file
4
html/.user.ini
Normal file
@ -0,0 +1,4 @@
|
||||
; Wird von PHP nur genutzt, wenn user_ini in der Pool-Konfiguration erlaubt ist (manchmal bei Shared Hosting).
|
||||
; Server-weit besser: conf.d/99-einkauf-uploads.ini wie im Apache-Setup-Script.
|
||||
upload_max_filesize = 20M
|
||||
post_max_size = 25M
|
||||
4
public/.user.ini
Normal file
4
public/.user.ini
Normal file
@ -0,0 +1,4 @@
|
||||
; Wird von PHP nur genutzt, wenn user_ini in der Pool-Konfiguration erlaubt ist (manchmal bei Shared Hosting).
|
||||
; Server-weit besser: conf.d/99-einkauf-uploads.ini wie im Apache-Setup-Script.
|
||||
upload_max_filesize = 20M
|
||||
post_max_size = 25M
|
||||
@ -94,6 +94,32 @@ apachectl configtest
|
||||
echo "==> Apache neu laden"
|
||||
systemctl reload apache2
|
||||
|
||||
echo ""
|
||||
echo "==> PHP-Upload-Limits (Handy-Fotos / Mediathek: oft > 2 MB)"
|
||||
PHP_INI_SNIPPET="$(cat <<'INI'
|
||||
; einkauf: genug fuer HEIC/JPEG aus der Mediathek (Laravel erlaubt bis 15 MB pro Foto)
|
||||
upload_max_filesize = 20M
|
||||
post_max_size = 25M
|
||||
INI
|
||||
)"
|
||||
for phpver_dir in /etc/php/*/fpm/conf.d /etc/php/*/apache2/conf.d; do
|
||||
if [[ -d "${phpver_dir}" ]]; then
|
||||
ini_path="${phpver_dir}/99-einkauf-uploads.ini"
|
||||
echo " schreibe ${ini_path}"
|
||||
printf '%s\n' "${PHP_INI_SNIPPET}" >"${ini_path}"
|
||||
fi
|
||||
done
|
||||
if command -v systemctl >/dev/null 2>&1; then
|
||||
shopt -s nullglob
|
||||
for unit in /lib/systemd/system/php*-fpm.service; do
|
||||
svc=$(basename "${unit}")
|
||||
echo " reload ${svc}"
|
||||
systemctl reload "${svc}" 2>/dev/null || true
|
||||
done
|
||||
shopt -u nullglob
|
||||
fi
|
||||
systemctl reload apache2 2>/dev/null || true
|
||||
|
||||
echo ""
|
||||
echo "Fertig (HTTP)."
|
||||
echo ""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user