http://qs321.pair.com?node_id=1101437


in reply to CGI SCRIPT ITSELF IS DISPLAYED

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.)

Steve
--