Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

"File Not Found" error

Posted on 2000-04-23
7
Medium Priority
?
195 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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

705 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