Calling CGI script from HTML
Posted: Sat Feb 03, 2007 4:02 am
I have a form that calls a CGI script:
My provider has informed me that I can use CGI scripts and that they must be placed under the cgi-bin directory which is below the root.
My webroot is: /usr/local/psa/home/vhosts/...domain.../httpdocs/
My cgi-bin directory is: /usr/local/psa/home/vhosts/...domain.../cgi-bin/
This code does NOT work:
Error which I received:
I have tested the paths and this code DOES work:
Is there anybody that can help me to make this form work?:
Code: Select all
<form method=post action="engine.cgi">My webroot is: /usr/local/psa/home/vhosts/...domain.../httpdocs/
My cgi-bin directory is: /usr/local/psa/home/vhosts/...domain.../cgi-bin/
This code does NOT work:
Code: Select all
<form method=post action="/usr/local/psa/home/vhosts/...domain.../cgi-bin/engine.cgi">The requested URL /usr/local/psa/home/vhosts/...domain.../cgi-bin/engine.cgi was not found on this server.
I have tested the paths and this code DOES work:
Code: Select all
<?php
include ('/usr/local/psa/home/vhosts/...domain.../httpdocs/inc.php');
?>Code: Select all
<form method=post action="/usr/local/psa/home/vhosts/...domain.../cgi-bin/engine.cgi">