Solved

"File Not Found" error

Posted on 2000-04-23
7
186 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now