Solved

CGI use in web host

Posted on 2000-03-12
9
169 Views
Last Modified: 2010-04-04
Hi!

I'm developing a CGI application and I'm writing it as an EXE. I know I can make it as an DLL and that's my problem :

I wish to make a banner rotator and my web provider only allow me to use about 10% of system resources, so what's the best to use? DLL or EXE? Note that it will have some traffic.

All I need to know, is wich is best, why, and if it's a library, what do I have to change in the application to make it a DLL.

Thanks.
0
Comment
Question by:jpcs
  • 5
  • 4
9 Comments
 
LVL 15

Expert Comment

by:simonet
ID: 2609873
If you want to create an ad rotator, why not use ASP? IIS already features an adrotator object that can save you a lotta time.

As of the EXE x DLL question, there are lots of difference between them:

An EXE is a CGI, and as an EXE, it is loaded/unloaded everytime a call to it is necessary.

A DLL is a ISAPI module, and it is loaded only once, residing in memory until the server is shutdown or until it's explicitly unloaded from the server.

In both cases, you'll need IIS or PWS to load use them. I strongly suggest IIS 4 or 5 (W2k).

Alex
0
 
LVL 1

Author Comment

by:jpcs
ID: 2609892
Hi!

Thanks...

About the ASP, the problem is that the rotator is a little more complex than a simple rotator.

I suppose the server uses APACHE for win32 and I can't use which I want,m since it's virtual hosting.

How Can I unload the ISAPI from my computer?

regards
0
 
LVL 15

Expert Comment

by:simonet
ID: 2609919
Since you're using Apache, then you have to use CGI, since Apache doesn't support ISAPI. AFAIK, only IIS supports ISAPI.

Anyhow, using CGI with Apache is pretty much the same thing as with IIS.

Unloading the ISAPI DLL from IIS can be done from the MMC options. I am not on an NT machine right now, but if I recall correctly, you select the site (on MMC for IIS), select the DLL, right click it and then select Properties. There's one option for the loading the DLL that allows you to unload it using MMC (in the same screen).

To change an ISAPI project to a CGI project is a simple process and is explained here:

http://community.borland.com/article/0,1410,20641,00.html

Yours,

Alex
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:jpcs
ID: 2610088
hi!

sorry to bother again, but as I said, It's virtual hosting, so I don't have access to the machine from my computer (I suppose), all I can do is use FTP client.

any ideas?
0
 
LVL 15

Expert Comment

by:simonet
ID: 2610132
Then you're better off using CGI. This way you don't have to worry about loading/unloading the file.

You'll be able to replace it unless there's a user at your site, using the CGI at the *exact* moment you're replace it.

You should also make sure the webmaster gives you the Script and Execute privileges for the site. if you don't have the EXECUTE privilege, the http server will not be allowed to run the CGI program and an 500 (internal server error) will be returned instead.

Yours,

Alex
0
 
LVL 1

Author Comment

by:jpcs
ID: 2610269
Thats what I suspected... but what about the CPU usage, won't I overload it using the exe?
0
 
LVL 15

Accepted Solution

by:
simonet earned 100 total points
ID: 2610282
Not really. Using an EXE causes some overhead, but very small to be relevant.

Alex
0
 
LVL 1

Author Comment

by:jpcs
ID: 2610290
great thanks... I'll give you the points.
0
 
LVL 15

Expert Comment

by:simonet
ID: 2610300
Thanks! Good luck with your project.

Alex
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
find a node in VST 2 70
delphi parse string to params 3 136
Why is there a Difference between the SQL String and using the Parameter ? 7 44
enhance the following code 3 37
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

789 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