Solved

"File Not Found" error

Posted on 2000-04-23
7
187 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sending email via Perl on Windows 3 136
PHP equivalent of opening a com object 5 69
Edit Odbc.ini using perl module 2 78
XPath Syntax help in conjunction with perl XML::LibXML 18 103
I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
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 …
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

912 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

17 Experts available now in Live!

Get 1:1 Help Now