cuco Posted October 19, 2004 Share Posted October 19, 2004 Hi guys, I'm just trying to run a very simple cgi script using Perl. I placed my CGI script under the cgi-bin directory but I don't get anything. Here are the errors I got: File does not exist: /home/empresa/public_html/public_html/cgi-bin/testform.cgi File does not exist: /home/empresa/public_html/404.shtml Premature end of script headers: /home/empresa/public_html/scgi-bin/testform.cgi This last error I tried to see what would happen; no luck. I also don't understand why in the first error I get /public_html repeated twice?? I was just testing this really small script to see if it works! Thanks for your help. Quote Link to comment Share on other sites More sharing options...
TCH-Andy Posted October 19, 2004 Share Posted October 19, 2004 Hi, can you provide a link to the page - or a copy of the code calling the script. It looks like you have the code incorrect, and have the public_html in twice when calling the script. Hence it cannot find the file. It then tries to call the 404 page - because it couldn't find the file - but that doesn't exist either. Quote Link to comment Share on other sites More sharing options...
TCH-Rob Posted October 19, 2004 Share Posted October 19, 2004 Cuco, Welcome to the forums and welcome home. Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted October 19, 2004 Share Posted October 19, 2004 Welcome to the forums and the family! Quote Link to comment Share on other sites More sharing options...
cuco Posted October 19, 2004 Author Share Posted October 19, 2004 The link to the page calling the code is: empresasmilanes.com/testform.html Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted October 19, 2004 Share Posted October 19, 2004 (edited) What is the cgi script supposed to do. Normally you call cgi scripts with an action associated to a submit button. But if you replace you link with this it may work. Edited October 19, 2004 by TCH-Bruce Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted October 19, 2004 Share Posted October 19, 2004 Actually you have it coded wrong. You have: CLICK HERE Add the bolded part and it will work. CLICK HERE You left off the .com in your link. Quote Link to comment Share on other sites More sharing options...
cuco Posted October 20, 2004 Author Share Posted October 20, 2004 Yes sir, this solve the problem, thank you very much!! Now I have another problem. I'm trying to do a simple form that let users contact me via email. My form is here: www.empresasmilanes.com/contactenos.htm. This form calls a script called sendmail.php. The thing is that when you click submit, you get the php code displayed on the browser. I placed the .php file under public_html, is this correct?? Thanks... Quote Link to comment Share on other sites More sharing options...
TCH-Don Posted October 20, 2004 Share Posted October 20, 2004 (edited) Did you create the sendmail.php page with a plain text editor? The <?php part is not right it is displayed as <body> <?<br> $email = $_REQUEST['email'];<br> It should be <body> <?php $email = $_REQUEST['email']; Also you cannot mix html like the <br> inside of php code. you can use echo("<br>"); Edited October 20, 2004 by TCH-Don Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.