Paul Lalli wrote:
> On Aug 27, 8:43 am, [EMAIL PROTECTED] (Mathew Snyder) wrote:
>> Let's forget for a moment that CGI::Ajax exists.  Instead, imagine that all I
>> want to do is call a Perl script from my AJAX application.  Having created 
>> all
>> the necessary communication lines I then pass the script URL with the GET
>> method to the "line" in order to execute said Perl script.
>>
>> All the script does is take all of the values in an array, join them into a
>> string and pass the string back to the calling JavaScript function.  
>> However, it
>> doesn't work and continually returns a 403 status code
>>
>> The script is chmod'ed to 755, the directory in which it resides is also
>> chmod'ed to 755 ensuring access.  
> 
> 403 is the HTTP code for Forbidden.  It means the server is refusing
> to run the script at all, generally because the access permissions are
> not correct.  I would double check those permissions to see if they
> really are what you think they are, and what your web server requires
> them to be.
> 
> Can you run the Perl/CGI script directly from the browser, without
> going through your AJAX application?  That would be a good first
> debugging step.
> 
>> I believe I use the print function from the
>> script basically printing the string to the "line" which the calling function
>> basically reads.  Is this correct?  I've seen it suggested to use the printf
>> function.
> 
> This is all irrelevant.  403 means your script was never run to begin
> with.  Whoever suggested that you might solve your problem by using
> printf() instead of print() does not know what they're talking about,
> and you should ignore advice from that person.
> 
> Paul Lalli
> 
> 

Thanks for your input.  I'm looking at the permissions now.  I'm running xampp
(lampp) on my local workstation.  I don't know if there is an issue with that.
However, looking at the /opt/lampp/cgi-bin directory shows me that it has
identical permissions for the one Perl file within it:

msnyder:/opt/lampp # ll
<snip>
drwxr-xr-x  2 root   root    4096 Jul 14  2004 cgi-bin
drwxr-xr-x  5 root   root    4096 Aug 26 12:07 rt-tool #my script resides within
here
</snip>

msnyder:/opt/lampp/cgi-bin # ll
<snip>
-rwxr-xr-x 1 root root 274 May  1  2004 printenv
</snip>

msnyder:/opt/lampp/rt-tool # ll
<snip>
drwxr-xr-x 2 root root 4096 Aug 27 09:31 cgi-bin
</snip>

msnyder:/opt/lampp/rt-tool/cgi-bin # ll
-rwxr-xr-x 1 root root 249 Aug 27 09:31 report_list.pl


The script in /opt/lampp/cgi-bin calls /opt/lampp/bin/perl while my script calls
/usr/bin/perl.  I changed it to /opt/lampp/bin/perl and got the same results.
Calling it directly did result in the 403 error within the browser.  Calling the
other script directly showed me the output it provides.

Thanks for the help.  If there is anymore you can provide I will be greatly
appreciative.

Mathew
-- 
Keep up with me and what I'm up to: http://theillien.blogspot.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to