= 80300, PHP_VERSION); check('GD-Erweiterung', extension_loaded('gd'), extension_loaded('gd') ? 'geladen' : 'fehlt'); check('GD: Bilder lesen', function_exists('imagecreatefromstring'), function_exists('imagecreatefromstring') ? 'imagecreatefromstring() vorhanden' : 'fehlt'); $jpegOk = function_exists('imagejpeg') && function_exists('imagetypes') && (imagetypes() & IMG_JPG) === IMG_JPG; check( 'GD: JPEG schreiben', $jpegOk, $jpegOk ? 'imagejpeg() mit JPEG-Unterstützung vorhanden' : 'fehlt – GD wurde ohne libjpeg gebaut' ); if (function_exists('imagetypes')) { $types = imagetypes(); $formats = []; foreach (['JPG' => IMG_JPG, 'PNG' => IMG_PNG, 'GIF' => IMG_GIF, 'WebP' => IMG_WEBP] as $name => $flag) { if (($types & $flag) === $flag) { $formats[] = $name; } } check('Formate lesen', $formats !== [], $formats !== [] ? implode(', ', $formats) : 'keine'); } echo "\n"; foreach (['upload_max_filesize', 'post_max_size', 'memory_limit', 'max_file_uploads', 'max_execution_time'] as $key) { check($key, true, (string) ini_get($key)); } $tmpDir = ini_get('upload_tmp_dir') ?: sys_get_temp_dir(); check('Upload-Temp-Verzeichnis', is_dir($tmpDir) && is_writable($tmpDir), $tmpDir); echo "\n"; $imgStorage = storage_path('img_storage'); check('storage/ existiert', is_dir(storage_path()), storage_path()); check('img_storage/ existiert', is_dir($imgStorage), $imgStorage); $writeTarget = is_dir($imgStorage) ? $imgStorage : storage_path(); check('img_storage/ beschreibbar', is_dir($writeTarget) && is_writable($writeTarget), $writeTarget); if (function_exists('posix_geteuid')) { $user = posix_getpwuid(posix_geteuid()); check('PHP-Benutzer', true, $user['name'] ?? (string) posix_geteuid()); } if (is_dir($imgStorage)) { $owner = fileowner($imgStorage); $group = filegroup($imgStorage); $ownerName = function_exists('posix_getpwuid') ? (posix_getpwuid($owner)['name'] ?? (string) $owner) : (string) $owner; $groupName = function_exists('posix_getgrgid') ? (posix_getgrgid($group)['name'] ?? (string) $group) : (string) $group; echo str_pad('Eigentümer img_storage', 28) . ': ' . $ownerName . ':' . $groupName . "\n"; } echo "\n"; if ($problems > 0) { echo $problems . " Problem(e) gefunden. Uploads können dadurch fehlschlagen.\n"; echo "Tipp: Im Docker-Setup korrigiert docker-compose.yml die Rechte beim Start\n"; echo " (chown -R www-data:www-data /var/www/storage).\n"; exit(1); } echo "Alles in Ordnung.\n";