0

Hi,

I admit i'm a complete newbie in perl although i have been invloved in php : ) hope somebody can help me out with this

I want to run a simple perl scrip :

#!/usr/bin/perl
        
print "Content-type: text/html\n\n";

$request_method=$ENV{'REQUEST_METHOD'};
print "request method:",$request_method,"<br>";
print "O.K.!";

but it shows this error msg:

"
Forbidden
You don't have permission to access /Project_Demo/hello.cgi on this server.


--------------------------------------------------------------------------------

Apache/1.3.29 Server at 127.0.0.1 Port 80

"

then i am wondering whether this is a script error or a server error

thanks in advance,
tris

3
Contributors
5
Replies
6
Views
11 Years
Discussion Span
Last Post by tristan17
0

What are the permissions settings of the file? You probably didn't set the file to be executable.

0

What are the permissions settings of the file? You probably didn't set the file to be executable.

hi,
thanks for your reply, but how do i check the permission setting of the file?

rgds,
tris

0

hi,
thanks for your reply, but how do i check the permission setting of the file?

rgds,
tris

Hi tris,

Use the following command to check if your hello.cgi is executable:

ls -l hello.cgi

Note the following position of the output:

-rw-rw-rwx 1 user group 564 Jan 29 00:02 hello.cgi

If there is no 'x' displayed in the above position, apply the following command:

chmod o+x hello.cgi

I think the situation is very much alike to that of your PHP scripts :)

Good luck,
Jim

0

Hi Jim,

Thanks for your reply. But i have fixed my problem, i think its because of the server setting. Anyway, i had changed the perl path in the scripts and now its working fine

rgds,
tris

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.