Bonsoir,
Je ne suis pas certain d'être au bon endroit mais je ne vois pas ou poster ailleurs.
Voila j'ai besoin d'utiliser un script cgi sur un hébergement infomaniak mais chaque fois que j'appelle le script j'ai ce message d'erreur:
Après quelque recherches j'ai compris que le problème venait éventuellement du transfert, donc j'ai bien contrôle que le transfert était fait en ascII, mais l'hébergeur dans sa doc parle également de cela:CGIWrap Error: Script Execution Failed
CGIWrap encountered an error while attempting to execute this script:
Error Message: Exec format error
Error Number: 8
This message usually indicates there is a problem with the script itself. Often this indicates either that the #! line of the script is incorrect, or the script was uploaded in binary mode instead of ascii mode. Check to make sure that the script does not have control-M's at the end of every line. That will prevent it from executing. An easy fix that takes care of this most of the time is to put '#!/.../perl --' instead of '#!/.../perl' on the first line of the script. This is typically a problem if the script was edited or uploaded from a DOS/Windows/Macintosh station to a unix based server.
If you are not the owner of this script, please forward this error and the URL that caused it to the script owner. That is often the component in the URL right after /cgiwrap/.
Server Data:
Server Administrator/Contact: webmaster@domaine.fr
Server Name: www.domaine.fr
Server Port: 80
Server Protocol: HTTP/1.1
Virtual Host: www.domaine.fr
Request Data:
User Agent/Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)
Request Method: GET
Remote Address: xx.xxx.x.xxx
Remote Port: xxxx
Extra Path Info: /cgi-bin/modulev2.cgi
et la je suis un peut perdu car je ne sais pas par quel moyen je peux faire cette vérification et rajouter ce qui peut éventuellement manquer.Les CGI doivent impérativement commencer par Content-Type suivi de deux CRLF (ou au moins deux LF) avant d'afficher le contenu. Ceci peut être obtenu en envoyant un "print"
Content-Type: text/html suivi d'un deuxième "print" vide
ou en utilisant deux fois la séquence anti slash suivi de r et anti slash suivi de n.
De plus, pour que les CGI Python ou Perl soient reconnus chez nous, elles doivent être enregistrées au format unix (LF - anti slash n) et dans aucun cas en format ms-dos (CRLF anti slash r suivi de anti slash n ou CR anti slash r).
Précision: le script CGI on me le transmet par email, je le récupère sur un système windows, et je le re transfert sur un hébergement linux via fizellaftp.
voila merci de votre aide très précieuse.....
Partager