CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Permission Denied

 



reefland
Deleted

Feb 22, 2000, 4:03 PM

Post #1 of 5 (807 views)
Permission Denied Can't Post

I am new to perl and cgi (trying to get through the basics). I have copied a perl script that is supposed to allow information from a form to be posted, but when the submit button is pushed, I get exec()returned: 13: Permission Denied. I believe that I have the path to perl correct perl/bin (location of perl.exe) and that is at the top of my page. My script is in a cgi-bin obviously. I tried to set the permission with chmod 755 but 1. is this only for unix and 2. where would i locate the command in my script?
Any help is appreciated


perlkid
stranger

Feb 22, 2000, 6:50 PM

Post #2 of 5 (807 views)
Re: Permission Denied [In reply to] Can't Post

 
Hi,

Yes you only need to chmod folders and directories on unix platforms and a few other unix type platforms like linux, and the path to perl for unix is

#!/usr/local/bin/perl

#!/usr/bin/perl

#!/usr/local/bin/perl5

#!/usr/bin/perl5

depending on your server it will be one of those. Most likely the first one.

You should post your script so people can look at it. I can't begin to tell you how to fix you program without seeing it. I may not be able to tell what your problem is but if you post it at least others will be able to take a look.

perlkid


reefland
Deleted

Feb 23, 2000, 1:19 AM

Post #3 of 5 (807 views)
Re: Permission Denied [In reply to] Can't Post

ok here it is

#!perl/bin/perl

chmod 755 geturl.pl

# Get HTML header, ender, define the page title.

# Get the query string.

$QueryString = $ENV{'QUERY_STRING'};

@NameValuePairs = split (/&/, $QueryString);

# Put up an HTML Header, page title and a rule.

print "BODY>\n";
print "<H1>&Title</H1>\n";
print "<HR>\n";

# Split each of the name-value pairs and print them on the page.

foreach $NameValue (@NameValuePairs)
{
($Name, $Value) = split (/=/, $NameValue);
print "Name = $Name, value = $Value<BR>\n";
}

# End geturl.pl

Now does the first command have to be like that, it can't resemble my first line?



brian.hayes
User

Feb 23, 2000, 3:18 AM

Post #4 of 5 (807 views)
Re: Permission Denied [In reply to] Can't Post

Comment out:

chmod 755 geturl.pl

to:

#chmod 755 geturl.pl

It looks like you trying to have the scripts chmod itself. This needs to be done another way i.e tenet, console

Brian Hayes


reefland
Deleted

Feb 23, 2000, 2:02 PM

Post #5 of 5 (807 views)
Re: Permission Denied [In reply to] Can't Post

Thanks for the help here, but I figured it out. The only problem was I had to set the chmod permission through WS_FTP once the script was in the cgi-bin. It was a matter of right-clicking on the file and changing the permission to execute for all.

I HAVE SUCCESSFULLY COMPLETED MY FIRST CGI SCRIPT (HHHOOOOORRRRAAAAYYYY)

Now that I can get the information to post back to the visitor of my page, how do I get the information back to me? That will be my next challenge. Once again, thanks for the help, and I'm sure you'll see reefland back here with a new topic.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives