I am using C based CGI on my linux system and in my form I upload a file:
"<form id=\"systemupdate_form\" action=\"SaveSystemUpdate.cgi\" onsubmit=\"return (polling_start() && ValidateForm(this));\" enctype=\"multipart/form-data\" method=POST>\n"
SaveSystemUpdate.cgi : gets called when the user hits the upload button.
polling_start(): is a javascript function where Ajax keeps asking for the updated value(number of bytes being copied) from another xyz.cgi script. The contents of this cgi is: system("some command");
The whole structure is logically correct, but the xyz.cgi returns Ajax status to be 0 or 500 most of the time.
"<form id=\"systemupdate_form\" action=\"SaveSystemUpdate.cgi\" onsubmit=\"return (polling_start() && ValidateForm(this));\" enctype=\"multipart/form-data\" method=POST>\n"
SaveSystemUpdate.cgi : gets called when the user hits the upload button.
polling_start(): is a javascript function where Ajax keeps asking for the updated value(number of bytes being copied) from another xyz.cgi script. The contents of this cgi is: system("some command");
The whole structure is logically correct, but the xyz.cgi returns Ajax status to be 0 or 500 most of the time.