Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Aug 2004 07:52:00 -0700 (PDT)
From:      Mark Jayson Alvarez <jay2xra@yahoo.com>
To:        freebsd-questions@freebsd.org
Subject:   Humble questions for web developers in freebsd.
Message-ID:  <20040820145201.68204.qmail@web51603.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
Greetings, 
 
      I have installed the latest Apache http server
for the first time and I have just started programming
perl cgi scripts as well. It didn't brought me any
trouble installing it, but when I wrote my first
"Hello World" cgi script, I end up with an internal
server error. Eventually (through a very intensive,
sleepless researching), I was able to run it
successfully  
in a browser after changing its mode to 755(whiew!). 
 
Questions: 
1. Do I always have to do this for every script that I
would make? I thought, apache web server will know how
to execute those files if it sees something like
#!/usr/local/bin/perl in the beginning of the file. 
 
2. I'm having a small clue on this one. The perl
book("Beginning Perl") told me that in a default
installation, apache is started by "nobody"(after
running"ps -aux |grep httpd", I can see at least five
httpd processes run by nobody and one that is run by
me(root).) --if it is run by nobody, then it can't run
the cgi script I have written right? Elucidate me
please.  (And also those 5 nobody's) 
 
 
Few perl/html questions(...related to freebsd :=): 
 
1. (hmm.. just curious) Can't I start writing a perl
program or just a plain text file that already has a
755 mode?(ex: vi  -m 755... hello.plx) 
 
2. Do you know how can I run a perl program in freebsd
without having it preceded with the word perl? 
(I tried changing its mode to 755 and also putting it
to /usr/local/bin but it didn't work(don't laugh at me
please.. I'm still learning:=). 
 
3. If you happened to be one, I'm already having a
picture of how web developers are creating web pages
or cgi scripts(because the whole apache directory is
owned by the root, they would have to write them
outside and then transfer them inside when they are
finish, am I correct?? Because what I did was, change
the ownership of the entire apache directory for me to
be able to save an html file or a cgi script in it... 
 
4. Do you happen know any good link where I can learn
how to write shell scripts so that I may be able to
start an application at boot time by putting it in
"/usr/local/etc/rc.d" (ex: httpd) 
 
I'm just a fresh graduate and I'm still learning many
things by myself in preparation for future career in
IT. it's a sad fact, but I may have to admit that my
professors in college have just thought us the
"basics" in our field. Any help coming from you would
be very much appreciated... 
 
And again, thanks a lot. 
 
 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040820145201.68204.qmail>