Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

"File Not Found" error

Posted on 2000-04-23
7
Medium Priority
?
196 Views
Last Modified: 2010-03-05
I am currently working on a PERL CGI prorgam that works of a Linux Mandrake server.  Prior to adding anything having to do with input to it, I was able to get it to output the correct stuff to the browser.  Now, however, I only get a "The page cannot be displayed" on my browser.

I have already checked the error_log file.  in it it both says that the file does not exist (It does too exist!) and that there is a premature end of the script <name of file>.

I have already performed chmod 777 <filename> several times over, so I don't think that is the problem.

I have thrown a test CGI program onto the server and am getting the same error.  If I can only figure out what the problem is, I can fix it.  Otherwise, all of my work is seeming to be futile.  The test code that is doing this to me is as follows:

form.html-
<html><body>
<pre>
<form action="/cgi-bin/test.cgi" method="GET" name="matrix">
CPSC    <input type="checkbox" name="cpsc" value="1"><br>
A's     <input type="checkbox" name="as" value="1"><br>
Seniors <input type="checkbox" name="seniors" value="1" checked><p>
</pre>
<input type="submit" value="Enter Info">
</form>
</body></html>

test.cgi-
#!/usr/bin/perl

use CGI qw (param);

$seniors = param("seniors");
print "Content-type: text/html\n\n";
print "<html><body>\n";
print $seniors;
print "\n</body></html>";

Thanks to anyone who can help.
0
Comment
Question by:shakedust
  • 4
  • 2
7 Comments
 

Expert Comment

by:WestIn
ID: 2742733
show the error_log file.
0
 
LVL 1

Expert Comment

by:lambda
ID: 2742772
Unless /cgi-bin/test.cgi is not the correct path (which you say it is), there appears no other problem.

£.
0
 

Author Comment

by:shakedust
ID: 2742821
The line from error_log is as follows:

[Sun Apr 23 21:30:35 2000] [error] (2)No such file or directory: exec of /home/httpd/cgi-bin/test.cgi failed
[Sun Apr 23 21:30:35 2000] [error] [client 4.16.14.94] Premature end of script headers: /home/httpd/cgi-bin/test.cgi


It doesn't seem that anything should be wrong, but if that were the case I would imagine this would work.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Accepted Solution

by:
lambda earned 400 total points
ID: 2742848
Please verify the following:

- /usr/bin/perl is the path to perl.
- U have CGI.pm installed.

£.
0
 

Author Comment

by:shakedust
ID: 2742889
How can I be sure that I am checking both of these right (sorry, new to this)?  I assumed that /usr/bin/perl was correct since it has worked before, but I am not sure how to test if CGI.pm is installed.  Thanx.
0
 

Author Comment

by:shakedust
ID: 2742923
Lambda,
Thanks immensely.  Feel a little stupid that it was something as simple as the CGI module, but relieving nonetheless.

Shakedust
0
 

Author Comment

by:shakedust
ID: 2742927
see earlier post
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question