cyclewood_ltd at yahoo.co.uk
Sun Sep 24 13:49:01 UTC 2006
For starters, I doubt this problem is really for this list. There are other mailing lists available for Perl / CGI / mod_perl queries.
If you've installed the packages supplied in the Ubuntu distro, I might not be able to help you as I install all of mine from http://apache.org http://perl.apache.org
To answer some of your questions, look in the httpd.conf file to see the user. it's usualyy 'nobody'
To write output to your browser, in your example, you need to write sth like ...
make sure the following exists in conf/httpd.conf
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
and make sure the following directive exists and has values set such as ....
AddHandler cgi-script .cgi
Allow from all
Your scripts should look like ....
print "Content-type: text/html\n\n";
and be executable ..... chmod 755 test.cgi
If you wanna use the CGI class, try
my $cgi = CGI->new();
print 'Hello World!!';
make it executable and run it.
Make sure it's in your cgi-bin directory i.e. /usr/local/apache2/cgi-bin or /usr/apache2/cgi-bin
anyway, run cgi-bin/printenv to see if things are up and running..
Emil Edeholt <emil at knmedical.se> wrote: Hi,
I can't get CGI Perl up and running and I don't have a clue what to do.
Apache 2 and PHP works fine. I've uncomment AddHandler cgi-script .cgi
and perl is installed. But I guess something more is needed?
Apache gives me an forbidden error when I try to run my example script.
I've tried to 777 the script but I still get the error. Any ideas?
And btw under what user is apache 2 running normally in ubuntu?
My test script looks like this, and it works fine to run it from the
terminal, so atleast perl is working:
All ideas are welcome. Thanks!
Kind regards Emil
ubuntu-users mailing list
ubuntu-users at lists.ubuntu.com
Try the all-new Yahoo! Mail . "The New Version is radically easier to use" The Wall Street Journal
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ubuntu-users