Solved

CGI wit VB 4

Posted on 1998-06-23
6
442 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA Word macro - how to get characters after the searched for string 5 69
Adding to a VBA? 6 61
TT Auto Dashboard 13 83
VB6 ListBox Question 4 33
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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

920 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

11 Experts available now in Live!

Get 1:1 Help Now