Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CGI use in web host

Posted on 2000-03-12
9
Medium Priority
?
174 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
[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
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 400 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

636 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