Solved

CGI use in web host

Posted on 2000-03-12
9
166 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 1

Author Comment

by:jpcs
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 15

Expert Comment

by:simonet
Comment Utility
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
Comment Utility
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
Comment Utility
Not really. Using an EXE causes some overhead, but very small to be relevant.

Alex
0
 
LVL 1

Author Comment

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

Expert Comment

by:simonet
Comment Utility
Thanks! Good luck with your project.

Alex
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 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