Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: CGI SCRIPT ITSELF IS DISPLAYED

by skx (Parson)
on Sep 21, 2014 at 08:18 UTC ( [id://1101437]=note: print w/replies, xml ) Need Help??


in reply to CGI SCRIPT ITSELF IS DISPLAYED

There are two things wrong here:

  • The CGI script http://example.com/test.cgi is not being executed.
  • The action-element of your FORM is pointing to the wrong thing.

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1101437]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-25 04:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found