Solved

CGI wit VB 4

Posted on 1998-06-23
6
441 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 50 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now