Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CGI wit VB 4

Posted on 1998-06-23
6
Medium Priority
?
468 Views
Last Modified: 2010-05-03
I have got a PWS installed and have got the source code of CGI32.bas(This module initializes the CGI environment).But the problem is that Iam able to get a messagebox open through the remote PC but when it comes to sending back the HTML it gives an error saying HTTP headers not send.Iam using the PWS shipped with windows-95.Is it compatible for CGI?Another problem is that most probably the CGI data file which should have all the details of CGI to be executed is not being send as Iam not able to trap the command line arguments.Can you please help me out?If possible please suggest some books on CGI in VB.
0
Comment
Question by:zeus_akkali
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:kesonline
ID: 1464079
Ok - could you send me CGI32.bas and your project? I'll try to debug it for you. Are you sending "Content-type: text/html" and a blank line afterwards before you response? My email address is ben@kescom.net
0
 
LVL 6

Accepted Solution

by:
alamo earned 200 total points
ID: 1464080
Hi, I saw the question you just posted in CGI and saw it was a duplicate of this one, which I hadn't noticed earlier. I'll explain what's happening here and leave the other one open. You will probably want to delete it.

CGI32.bas is an interface module for a special kind of CGI, called WinCGI. WinCGI was invented because normal CGI uses STDIN and STDOUT to communicate with the web server, but VB programs are visual and almost never use STDIN and STDOUT (it's quite tricky). Under WinCGI the server writes the arguments to a file which CGI32.bas reads, and your program writes the web page output to a file which the server reads and sends back to the browser.

WinCGI is basically obsolete now. IIS doesn't support WinCGI, so there's no chance you can get your program to work with CGI32.bas.

However - it's tricky to do real CGI with VB, but not impossible, and someone has done the work and built a module so that you can do CGI from VB easily. It's called CGI4VB, and you need to replace CGI32 with it. I found a link to CGI4VB at http://pw2.netcom.com/~obrienk/index.html by doing a web search. Go there and get it, and you will be able to get your program working.

As to a book - I haven't read any but have heard there's a book "CGI programming
with Visual Basic 5". But search the web, there's a lot of info out there.

Good luck!
0
 
LVL 1

Author Comment

by:zeus_akkali
ID: 1464081
Alamao ,That was very nice of you that you cleared my doubt in no time.I just want to know one more thing as to If IIS does not support WinCGI then how is CGI programming done in Win95 environment.I have downloaded the cgi4vb.zip and after trying it out I will grade this question. thanks any way..

Bye,
Zeus.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:alamo
ID: 1464082
Ah, sorry if I wasn't clear -

IIS supports standard CGI, and cgi4vb makes your VB program compatible with standard CGI.

Most other languages commonly used for CGI (such as compiled C and perl) never had a problem with standard CGI, even under Win95, because they weren't visual languages. It was only VB that had the problem. And now that cgi4vb has solved the problem for VB, the WinCGI standard has died since it's no longer necessary.

Glad I could help!
0
 
LVL 6

Expert Comment

by:alamo
ID: 1464083
Hi zeus_akkali... could you grade this please? Thanks!
0
 
LVL 1

Author Comment

by:zeus_akkali
ID: 1464084
Soory alamo
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question