using the cgi option

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

using the cgi option

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

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

Post by pelegk2 »

i want it to answer me!
what do i need to do for that?
artologics
Forum Newbie
Posts: 1
Joined: Tue Mar 15, 2005 1:58 am
Contact:

Post by artologics »

same is the problem with me !!!!!!!!!!!!!! :wink:
Post Reply