Files
xamxam/nginx/scripts/fix-paths.sh
2026-04-15 14:24:44 +02:00

25 lines
630 B
Bash

#!/bin/bash
# Fix shared library paths for production deployment
echo "🔧 Fixing shared library paths for production..."
cd /var/www/html
# Fix paths in PHP files
find . -maxdepth 1 -name "*.php" -type f -exec sed -i "s|__DIR__ \. '/\.\./\.\./shared/|__DIR__ . '/shared/|g" {} \;
echo "✓ Updated paths in:"
echo " - index.php"
echo " - memoire.php"
echo " - search.php"
echo " - test_db.php"
# Test if it works
echo ""
echo "🧪 Testing..."
php -r "require_once '/var/www/html/shared/Database.php'; echo 'Database.php loads successfully\n';"
echo ""
echo "✅ Path fix complete!"
echo "Try: curl http://localhost/"