[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

[LI] the shell , cgi & other scripts are not running directly on prompt.



Hi friends,

I have instaslled Red hat linux 6.1,Apache 1.3 , perl5 on my pc.
But on my pc the shell , cgi  & other scripts are not running directly on
prompt.

Pls. solve the problem if u know whats wrong with my pc.

SEE some commands -

$>pwd
/home/httpd/cgi-bin

$>whereis perl
perl: /usr/bin/perl5.00503 /usr/bin/perl /usr/man/man1/perl.1

$>cat test.cgi
#!/usr/bin/perl
print "HELLO THIS  IS TEST SCRIPT !";

(user: root)

$>chmod 777 test.cgi            (and also with test.pl both have same
contents )

$>test.cgi    (and also with test.pl both have same contents )
bash: test.cgi:command not found

$> lynx 127.0.0.1/test.cgi
ALERT! HTTP1.1 /  500 INTERNAL SERVER ERROR

$>cat /etc/httpd/logs/error_logs
(with other logs----)
error (2)no such file or directory : Exec of /home/httpd/cgi-bin/test.cgi
[error] [client 127.0.0.1] premature end of script headers :
/home/httpd/cgi-bin/test.cgi
Note- one copy of All these script files are also in /home/httpd/html (and
this dir have permission to execute scripts from apache server)

there is also cgi.lib file in this directory
these are the common problem with all script files with extension .cgi,.pl.
.sh  or any other script
problems are common with root and othe user name!
problems are comman redhat6.1 & erlier version !

Regards
Naveen





--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.