500 Internal Server Error
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

500 Internal Server Error

by
HamzaG1
Created on 2023-08-23 07:13:35 (edited on 2024-09-04 11:30:06) in Hébergements Web

Bonjour,

Récemment, j'ai acheté un plan d'hébergement web chez vous. Cependant, lors de l'hébergement, j'ai rencontré un problème d'accès à mon site avec le message suivant :

"500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at postmaster@emimafood.online to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log."

Mon projet fonctionne parfaitement en local sur MAMP/htdocs, et une fois les fichiers transférés là-bas, tout fonctionne sans nécessiter de base de données ni rien d'autre.

J'espère que vous pourrez m'aider à résoudre ce problème.

Merci d'avance.


11 Replies ( Latest reply on 2023-08-23 13:34:36 by
HamzaG1
)

Bonjour @HamzaG1


Quel domaine ?
Quel cms ?
Installation en un clic ?

Bonjour @Gaston_Phone

Domaine : **emimafood.online**
Pas de CMS ni d'installation en un clic.
Un projet Laravel qui fonctionne parfaitement en local sur MAMP/htdocs.


emimafood.online


Bonjour,

Votre site ne répond pas. le message d'erreur est produit après très exactmenent 160 secondes.

Que fait-il pendant ce temps ? Soit vous minez 0,00001 bitcoin, soit vous avez une série d'instructions qui tournent en boucle, soit votre site attend indéfiniment sur une instruction extérieure.

Avez-vous été voir dans votre espace client > hébergement > (...) log d'erreur du jour ?

Votre erreur est d'autant plus perturbante que l'appel à ceci:
http://emimafood.online/xxx.html est aussi parti pour 2 minutes 40 de non-réponse, alors que je m'attendais à un 404 immédiat.

Peut-on voir le contenu de votre .htaccess, svp ?

Bonjour @Fritz2cat

Honnêtement, je n'ai aucune idée de ce qu'il fait pendant ces 160 secondes.
J'ai acheté le projet depuis le site Codecanyon. Il s'agit de la partie administrateur d'un projet Multirestaurants.

Sinon, voici ce que j'ai trouvé dans le log :
**[Wed Aug 23 11:39:15 2023] [error]** [client 92.223.85.250] ModSecurity: Access denied with code 403 (phase 1). Match of "rx ^0?$" against "REQUEST_HEADERS:Content-Length" required. [file "/usr/local/apache2/conf/modsecurity/base_rules/modsecurity_crs_20_protocol_violations.conf"] [line "81"] [id "960011"] [rev "2.1.1"] [msg "GET or HEAD requests with bodies"] [severity "CRITICAL"] [tag "PROTOCOL_VIOLATION/EVASION"] [tag "WASCTC/WASC-21"] [tag "OWASP_TOP_10/A7"] [tag "PCI/6.5.10"] [tag "http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3"] [hostname "emimafood.online"] [uri "/wp-includes/wlwmanifest.xml"] [unique_id "ZOXTw@f5LSMieTS40r8YkAAAAJg"]
**[Wed Aug 23 11:40:25 2023] [error]** [client 92.223.85.250] [host emimafood.online] AH10141: FastCGI: comm with server "/homez.985/emimafs/www/index.php" aborted: idle timeout (160 sec)
**[Wed Aug 23 11:40:25 2023] [error]** [client 92.223.85.250] [host emimafood.online] AH10149: FastCGI: incomplete headers (0 bytes) received from server "/homez.985/emimafs/www/index.php"

et voici la contenue du fichier .htaccess :


je n'ai aucune idée de ce qu'il fait pendant ces 160 secondes.
...
/usr/local/apache2/conf/modsecurity/


Désactivez le firewall (pare-feu)
Il y a peut-être un bug dedans ?

L'erreur 403 n'apparaît plus, mais l'erreur 500 persiste toujours.

Ces deux erreurs sont toujours présentes dans le log :
**[Wed Aug 23 12:14:10 2023] [error]** [client 41.230.219.170] [host emimafood.online] AH10141: FastCGI: comm with server "/homez.985/emimafs/www/index.php" aborted: idle timeout (160 sec)

**[Wed Aug 23 12:14:10 2023] [error]** [client 41.230.219.170] [host emimafood.online] AH10149: FastCGI: incomplete headers (0 bytes) received from server "/homez.985/emimafs/www/index.php"


idle timeout (160 sec)


Essayez d'échanger dans votre moteur d'exécution: PHP-CGI avec PHP
qui sait ? Il y aura peut-être un message d'erreur différent ?

En passant à phpcgi, cela affiche maintenant seulement cette erreur dans le log:

[Wed Aug 23 12:32:38 2023] [error] [client 41.230.219.170] [host emimafood.online] Script timed out before returning headers: index.php

voici le contenue de mon fichier index.php :
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
*/
require __DIR__.'/vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
*/
$app = require_once __DIR__.'/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
*/
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
?>


**En déboguant** le fichier index ligne par ligne, je constate qu'il se bloque à cette ligne :

$response = $kernel->handle($request = Illuminate\Http\Request::capture());


En déboguant le fichier index ligne par ligne, je constate qu'il se bloque à cette ligne :

$response = $kernel->handle($request = Illuminate\Http\Request::capture());


Je n'ai aucune idée de ce que c'est supposé faire. J'espère que vous le savez.

Merci à toi