Solved

"File Not Found" error

Posted on 2000-04-23
7
189 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 1

Accepted Solution

by:
lambda earned 100 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
use perl to insert into MySQL database 9 137
transpose into pipe delemited 8 69
Perl script to delete older files 6 88
html form to write data to csv 24 114
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 …
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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…

821 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