On the C language CGI called shell script error Premature end of script headers

I invoke the shell script in CGI, the script has been released permissions
#!/bin/bash

if [ $# -eq 2 ] ; then
cmdstr="configure terminal
no ip route $1 $2
"

vtysh -c "$cmdstr"
if [ 0 -eq $? ] ; then
exit 0
else
exit 1
fi
else
# echo "error paraments number"
exit 1
fi
But when the call to system if not redirected to a file called the error above ~ do not know why

Started by Vicky at November 17, 2016 - 11:32 PM

You are in the printf ("Content-Type: text/html\r\n\r\n"); the front calls this script.

Posted by Ruth at November 20, 2016 - 12:28 AM