Solved

CGI use in web host

Posted on 2000-03-12
9
167 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
 
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
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 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

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

895 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

14 Experts available now in Live!

Get 1:1 Help Now