CGI: 502 Bad Gateway The CGI is not CGI / 1.1 compliant.

I have a form on an HTM page that, after the submit button is clicked, calls index.cgi!

#!/usr/bin/sh

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/nastools/pysqlite2/pysqlite2
export PYTHONPATH=$PYTHONPATH:/nastools/pysqlite2/:/path/impo
export PATH=/nastools/python64/bin/:$PATH

python /remote/path/impo/manager.py 2>&1

      

I just want to run manager.py which is stored in / remote / path / impo folder !!

I'm completely crazy about this stupid error and can't find a way to solve it ...

Any suggestion

+1


source to share


1 answer


Thanks NineBarry, but I found the problem ... After trying with CGI scripts will surely like:

#!/bin/sh
echo Content-type: text/html
echo
echo
echo "<HTML>"
echo "<HEAD>"
echo "</HEAD>"
echo "<BODY>"
echo "<H2>Users logged in are:</H2>"
echo "<PRE>"
who
echo "</PRE>"
echo "</BODY>"
echo "</HTML>"

      

I remember by accident that I didn't set the permissions !!!! I lost 2 hours on it ... I only fixed it with chmod 777 name.cgi ...



Sorry for everything if I wasted your time!

Bye

+2


source







All Articles