ini_get('upload_max_filesize'), 'post_max_size' => ini_get('post_max_size'), 'max_file_uploads' => ini_get('max_file_uploads'), 'memory_limit' => ini_get('memory_limit'), 'max_execution_time' => ini_get('max_execution_time'), 'max_input_time' => ini_get('max_input_time'), 'file_uploads' => ini_get('file_uploads'), 'upload_tmp_dir' => ini_get('upload_tmp_dir') ]; foreach ($uploadSettings as $setting => $value) { echo " - $setting: $value\n"; } // 2. GD Extension prüfen echo "\n2. GD Extension prüfen:\n"; if (extension_loaded('gd')) { echo " ✅ GD Extension geladen\n"; $gdInfo = gd_info(); echo " - GD Version: " . $gdInfo['GD Version'] . "\n"; echo " - JPEG Support: " . ($gdInfo['JPEG Support'] ? 'Ja' : 'Nein') . "\n"; echo " - PNG Support: " . ($gdInfo['PNG Support'] ? 'Ja' : 'Nein') . "\n"; echo " - GIF Support: " . ($gdInfo['GIF Support'] ? 'Ja' : 'Nein') . "\n"; } else { echo " ❌ GD Extension nicht geladen\n"; } // 3. Intervention Image prüfen echo "\n3. Intervention Image prüfen:\n"; try { require_once 'vendor/autoload.php'; if (class_exists('Intervention\Image\ImageManager')) { echo " ✅ Intervention Image verfügbar\n"; // Test ImageManager $manager = new \Intervention\Image\ImageManager(new \Intervention\Image\Drivers\Gd\Driver()); echo " ✅ ImageManager funktioniert\n"; } else { echo " ❌ Intervention Image nicht verfügbar\n"; } } catch (Exception $e) { echo " ❌ Intervention Image Fehler: " . $e->getMessage() . "\n"; } // 4. Storage-Verzeichnisse prüfen echo "\n4. Storage-Verzeichnisse prüfen:\n"; $storagePaths = [ 'storage' => 'Storage Root', 'storage/app' => 'Storage App', 'storage/app/public' => 'Storage Public', 'storage/app/public/nail_polishes' => 'Nail Polishes Storage', 'public/storage' => 'Public Storage Link' ]; foreach ($storagePaths as $path => $description) { if (file_exists($path)) { $perms = substr(sprintf('%o', fileperms($path)), -4); $writable = is_writable($path) ? 'writable' : 'not writable'; $type = is_dir($path) ? 'directory' : (is_link($path) ? 'symlink' : 'file'); echo " ✅ $description: $path ($type, perms: $perms, $writable)\n"; } else { echo " ❌ $description: $path (nicht gefunden)\n"; } } // 5. Laravel Storage Link prüfen echo "\n5. Laravel Storage Link prüfen:\n"; $publicStoragePath = 'public/storage'; if (is_link($publicStoragePath)) { $target = readlink($publicStoragePath); echo " ✅ Storage Link existiert: $publicStoragePath -> $target\n"; } else { echo " ⚠️ Storage Link existiert nicht\n"; // Versuche Storage Link zu erstellen try { if (file_exists('storage/app/public')) { if (is_dir('public/storage')) { rmdir('public/storage'); } symlink('../storage/app/public', 'public/storage'); echo " ✅ Storage Link erstellt\n"; } else { echo " ❌ storage/app/public existiert nicht\n"; } } catch (Exception $e) { echo " ❌ Storage Link erstellen fehlgeschlagen: " . $e->getMessage() . "\n"; } } // 6. Laravel-Logs prüfen echo "\n6. Laravel-Logs prüfen:\n"; $logFiles = [ 'storage/logs/laravel.log', 'storage/logs/laravel-' . date('Y-m-d') . '.log' ]; foreach ($logFiles as $logFile) { if (file_exists($logFile)) { echo " 📋 $logFile gefunden\n"; $lines = file($logFile); $lastLines = array_slice($lines, -5); echo " 📄 Letzte 5 Zeilen:\n"; foreach ($lastLines as $line) { if (strpos($line, 'error') !== false || strpos($line, 'Exception') !== false || strpos($line, 'upload') !== false) { echo " " . trim($line) . "\n"; } } } else { echo " ❌ $logFile nicht gefunden\n"; } } // 7. Test-Bild erstellen echo "\n7. Test-Bild erstellen:\n"; try { $testImagePath = 'storage/app/public/nail_polishes/test.jpg'; if (extension_loaded('gd')) { // Erstelle ein einfaches Test-Bild $image = imagecreate(100, 100); $bgColor = imagecolorallocate($image, 255, 255, 255); $textColor = imagecolorallocate($image, 0, 0, 0); imagestring($image, 5, 10, 40, 'TEST', $textColor); if (imagejpeg($image, $testImagePath, 80)) { echo " ✅ Test-Bild erstellt: $testImagePath\n"; // Prüfe ob Bild über Web erreichbar ist $webPath = 'public/storage/nail_polishes/test.jpg'; if (file_exists($webPath)) { echo " ✅ Test-Bild über Web erreichbar\n"; } else { echo " ❌ Test-Bild nicht über Web erreichbar\n"; } } else { echo " ❌ Test-Bild erstellen fehlgeschlagen\n"; } imagedestroy($image); } else { echo " ❌ GD Extension nicht verfügbar für Test-Bild\n"; } } catch (Exception $e) { echo " ❌ Test-Bild Fehler: " . $e->getMessage() . "\n"; } // 8. Controller-Code prüfen echo "\n8. Controller-Code prüfen:\n"; $controllerPath = 'app/Http/Controllers/UserNailPolishController.php'; if (file_exists($controllerPath)) { $content = file_get_contents($controllerPath); // Prüfe ImageManager Import if (strpos($content, 'use Intervention\\Image\\ImageManager') !== false) { echo " ✅ ImageManager Import vorhanden\n"; } else { echo " ❌ ImageManager Import fehlt\n"; } // Prüfe Driver Import if (strpos($content, 'use Intervention\\Image\\Drivers\\Gd\\Driver') !== false) { echo " ✅ Driver Import vorhanden\n"; } else { echo " ❌ Driver Import fehlt\n"; } // Prüfe Bildverarbeitungscode if (strpos($content, 'new ImageManager(new Driver())') !== false) { echo " ✅ Bildverarbeitungscode vorhanden\n"; } else { echo " ❌ Bildverarbeitungscode fehlt\n"; } } else { echo " ❌ Controller nicht gefunden\n"; } echo "\n✅ Bild-Upload Debug abgeschlossen!\n"; echo "🔗 Testen Sie jetzt: https://neonail.vogt.de.com/create-nail-polish\n"; echo "\n📋 Nächste Schritte:\n"; echo "1. Prüfen Sie die Laravel-Logs für spezifische Fehlermeldungen\n"; echo "2. Testen Sie mit einem kleinen Bild (< 1MB)\n"; echo "3. Prüfen Sie Browser-Entwicklertools (F12) für Netzwerk-Fehler\n"; echo "4. Schauen Sie in Apache-Logs für Server-Fehler\n"; ?>