Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CGI wit VB 4

Posted on 1998-06-23
6
Medium Priority
?
462 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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.

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

688 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