File Manager del error 500

Encontre este codigo de solucion aqui en el foro
Los comandos serían mas detallados seria asi:

cd /usr/local/hestia/web/fm/backend/Services/Session/Adapters/
sudo mv SessionStorage.php SessionStorage.php.ori
sudo curl -fssLm20 https://raw.githubusercontent.com/sahsanu/hestiacp/90e175baed239cccab8761dbfdc693bc9642c066/install/deb/filemanager/filegator/backend/Services/Session/Adapters/SessionStorage.php -o SessionStorage.php

Después reiniciámos los servicios:

sudo systemctl restart php8.3-fpm
sudo systemctl restart nginx
sudo systemctl restart hestia

Luego probe nuevamente el File Manager.

Despues de realizar este procesimiento me salio otro error que es este
{“error”:“Internal Server Error”}

Primero verifique la versión de PHP

php -v

systemctl status php8.3-fpm

Vi que todo estaba en orden y me salio este problema

DI\NotFoundException: No entry or class found for ‘\Filegator\Services\Session\Adapters\SessionStorage’

Esto significa que el archivo SessionStorage.php quedó corrupto o incompleto después de las pruebas/parches o sea que el archivo quedó mal editado.

La solución

Restaurar correctamente el archivo compatible.

  1. Ir al directorio
    cd /usr/local/hestia/web/fm/backend/Services/Session/Adapters/
  2. Eliminar archivo roto
    sudo rm -f SessionStorage.php
  3. Descargar la versión corregida
    sudo wget -O SessionStorage.php https://raw.githubusercontent.com/sahsanu/hestiacp/90e175baed239cccab8761dbfdc693bc9642c066/install/deb/filemanager/filegator/backend/Services/Session/Adapters/SessionStorage.php
  4. Verificar permisos
    sudo chown root:root SessionStorage.php
    sudo chmod 644 SessionStorage.php
  5. Limpiar caché de FileGator
    cd /usr/local/hestia/web/fm
    sudo rm -rf private/cache/*

Si da error porque no existe, ignoralo.

  1. Reiniciar servicios
    sudo systemctl restart php8.3-fpm
    sudo systemctl restart nginx
    sudo systemctl restart hestia
  2. Verificar sintaxis PHP

MUY IMPORTANTE:

php -l /usr/local/hestia/web/fm/backend/Services/Session/Adapters/SessionStorage.php

Debe decir:

No syntax errors detected
8. Probar nuevamente /fm/

CON ESTO YA DEBERIA FUNCIONAR

EXTRA

Respaldar el archivo corregido
sudo cp /usr/local/hestia/web/fm/backend/Services/Session/Adapters/SessionStorage.php /root/SessionStorage.php.backup

Con esto evitamos que futuras actualizaciones lo corrompan

Si reaparece, simplemente restaurar:
sudo cp /root/SessionStorage.php.backup /usr/local/hestia/web/fm/backend/Services/Session/Adapters/SessionStorage.php

y reiniciar:

sudo systemctl restart php8.3-fpm nginx hestia

Esto lo hice validando con la inteligencia articial para llegar a esta conclucion y resolucion.

English only please

I found this solution code here on the forum. The commands would be more detailed, like this:

cd /usr/local/hestia/web/fm/backend/Services/Session/Adapters/
sudo mv SessionStorage.php SessionStorage.php.ori
sudo curl -fssLm20 https://raw.githubusercontent.com/sahsanu/hestiacp/90e175baed239cccab8761dbfdc693bc9642c066/install/deb/filemanager/filegator/backend/Services/Session/Adapters/SessionStorage.php -o SessionStorage.php

Then we restart the services:

sudo systemctl restart php8.3-fpm
sudo systemctl restart nginx
sudo systemctl restart hestia

Then I tested the File Manager again.

After performing this procedure, I encountered another error:

{“error”: “Internal Server Error”}

First, I checked the PHP version:

php -v

systemctl status php8.3-fpm

I saw that everything was in order, and then I encountered this problem:

DI\NotFoundException: No entry or class found for ‘\Filegator\Services\Session\Adapters\SessionStorage’

This means that the SessionStorage.php file became corrupted or incomplete after the tests/patches; in other words, the file was incorrectly edited.

The solution:

Restore the correct, compatible file.

Go to the directory:

cd /usr/local/hestia/web/fm/backend/Services/Session/Adapters/
Remove the broken file:

sudo rm -f SessionStorage.php
Download the fixed version:

sudo wget -O SessionStorage.php https://raw.githubusercontent.com/sahsanu/hestiacp/90e175baed239cccab8761dbfdc693bc9642c066/install/deb/filemanager/filegator/backend/Services/Session/Adapters/SessionStorage.php
Verify permissions:

sudo chown root:root SessionStorage.php

sudo chmod 644 SessionStorage.php
Clear the FileGator cache:

cd /usr/local/hestia/web/fm

sudo rm -rf private/cache/*
If you get an error, why not? It exists, ignore it.

Restart services

sudo systemctl restart php8.3-fpm

sudo systemctl restart nginx
sudo systemctl restart hestia
Verify PHP syntax
VERY IMPORTANT:

php -l /usr/local/hestia/web/fm/backend/Services/Session/Adapters/SessionStorage.php

It should say:

No syntax errors detected
8. Test /fm/ again

THIS SHOULD WORK

EXTRA

Back up the corrected file

sudo cp /usr/local/hestia/web/fm/backend/Services/Session/Adapters/SessionStorage.php /root/SessionStorage.php.backup

This prevents future updates from corrupting it.

If it reappears, simply restore:

sudo cp /root/SessionStorage.php.backup /usr/local/hestia/web/fm/backend/Services/Session/Adapters/SessionStorage.php

and restart:

sudo systemctl restart php8.3-fpm nginx hestia

I used artificial intelligence to validate this and reach this conclusion and solution.

I don’t understand if you have a problem or are you just sharing instructions?

This is a contribution to the community; it would be helpful instructions for this type of problem.

I encountered this error and solved it using these steps.