[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cgi-bin



Quoting hcrouch@mchsi.com:
<SNIP>
>
> Having said all that, The Goal is to make database applications that are
> accessible to many users.  Let’s keep talking though this issue. If there is
> good reason to use PHP rather than Perl, please let me know what it is and
> I’ll
> change direction. 
>

Huge reason to use php over perl for web applications:  

  Perl scripts load the perl interpreter and compile the script on every single
execution.  It's usually pretty quick but you will definintely notice some load
if you're dealing with 10,000 or more hits to the script a day (fewer if your
server is not too big).  

  Php is a module of the server.  It is a built in handler for the server and is
loaded into memory with the server.  This is much faster.  For a onesy-twosy
thing it's a negligible difference but if you're really using the app, php is
really the preferred route for efficiency and scalability.

  If you have to use PERL for some reason, use MOD_PERL but if you're new to
this stuff and just learning, MOD_PERL is going to get you WAY over your head
(as in falling off the continental shelf).

  I'd  use PHP if it's going to ever see any real traffic and only use PERL if
it's something with a fixed audience that will never have any need to grow. 
That's not too often.

<SNIP> 
> The tutorial instructed me to write a short cgi script.  I did so, set
> permissions to 755, ran it through Perl to verify that syntax was correct,
> then
> moved the script into /usr/lib/cgi-bin/.
> 
> Now the problem.  The tutorial instructs me to test the script by launching
> my
> web browser and pointing it to
> http://www.yourwebhost.com/virtual_scripts_directory/my_script.cgi.  What is
> www.yourwebhost.com? Should this be something like
> http://localhost/usr/lib/gci-bin/my_script.cgi?
> 
Your server config will have a mapping to  /usr/lib/cgi-bin/.  It should map
/cgi-bin/ to that directory so a request of 
http://localhost/cgi-bin/my_script.cgi should find it fine.  You can also use
the address of the greatest warez site in the world: 
http://127.0.0.1/cgi-bin/my_script.cgi
and it will magically find your computer no matter where it is.

Look in your server config if you cannot find the right cgi-bin directory.  Just
search forward for cgi-bin and you should find the 
ScriptAlias directive somewhere.




Ken Hagan
Technology Consultant
Alacrity-IT, Inc
http://www.alacrity-it.com/
618.499.0108

----------------------------------------------------------------
This message was sent using Alacrity-IT Webmail
	http://www.alacrity-it.com/

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.