Page 1 of 1

using the cgi option

Posted: Tue Mar 15, 2005 12:41 am
by pelegk2
i want to use a cgi on the apache server!
i have this exe file taken from a thread i have posted on :
http://www.vbcity.com/forums/topic.asp? ... #RID298119
i compiled to file to an exe and putted it in a test folder!
the file is used as a cgi, and when i try to access it like this :

Code: Select all

<SCRIPT>
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject(&quote;Msxml2.XMLHTTP&quote;);
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject(&quote;Microsoft.XMLHTTP&quote;);
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  xmlhttp = new XMLHttpRequest();
}
xmlhttp.open(&quote;GET&quote;, &quote;http://localhost/test/cgi4vb.exe&quote;,true);
xmlhttp.send(&quote;x=asdfsadf&quote;);
xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   alert(xmlhttp.responseText)
  }
 }

</SCRIPT>
i recive a message with the letters "MZ" which i dont know why :(
is the place i putted the cgi is ok?should i put it on another place?
thnaks in adance
peleg

Posted: Tue Mar 15, 2005 1:25 am
by feyd
MZ is the first two binary tags in an exe file. You requested a download of the exe, not a CGI running of it. Research some more into how to set up a CGI script in Apache: http://httpd.apache.org/docs-2.0/howto/cgi.html

owww but i dont weant to d/l a file!

Posted: Tue Mar 15, 2005 1:54 am
by pelegk2
i want it to answer me!
what do i need to do for that?

Posted: Tue Mar 15, 2005 2:11 am
by artologics
same is the problem with me !!!!!!!!!!!!!! :wink: