|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Member
Iscritto dal: Oct 2013
Messaggi: 158
|
[PYTHON] Problema nell'eseguire uno script via web (500)
Salve a tutti, sto provando ad fare una chiamata ajax con uno script python, il problema e' che cosi strutturato il codice mi ritorna sempre 500 - Internal server error
script js Codice:
$.ajax ({
url: "cgi-bin/prova.py",
type: "POST",
datatype: "html",
success: function (response) {
alert('success');
},
error: function (xhr, ajaxOptions, thrownError) {
alert (thrownError );
}
});
script python Codice:
#!/usr/bin/python print """Content-type: text/html; charset=utf-8\n\n <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html>""" print """</html>""" Mi viene il dubbio che non esista nessun riconoscitore python ma guardando nella directory /usr/bin/ c'e un file python...la directory invece del python e' quella giusta, perche' se la cambio mi ritorna "Not Found"...quindi non ho la piu' pallida idea del perche' non funzioni..sono disperato |
|
|
|
|
|
#2 |
|
Member
Iscritto dal: Oct 2013
Messaggi: 158
|
scusate, ho risolto.
Il problema era che non vi erano i diritti di esecuzione sullo script python |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 16:36.



















