We don't bite newbies here... much | |
PerlMonks |
Re: CGI SCRIPT ITSELF IS DISPLAYEDby skx (Parson) |
on Sep 21, 2014 at 08:18 UTC ( [id://1101437]=note: print w/replies, xml ) | Need Help?? |
There are two things wrong here:
To solve the first problem you need to consult your webserver documentation, there are two ways you can go here - either configure the webserver to execute *.cgi, regardless of location, or copy the script into your cgi-bin directory - which will probably be /usr/lib/cgi-bin, since you mention ubuntu. If you want to configure CGIs to be globally executed you should start by looking at "a2enmod cgi", or similar. Secondly your form-action points to /var/www... which is a file reference and not a URL reference. It hsould be updated to point to /test.cgi, or /cgi-bin/test.cgi as appropriate. (You have the same issue with the image you try to print from your CGI-script. You need to learn the difference between a file-path and a URL-path.)
In Section
Seekers of Perl Wisdom
|
|