mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
25 lines
630 B
Bash
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/"
|