Home  |  Linux  | Mysql  | PHP  | XML
From:David Taiaroa Date:Sat Dec 19 02:02:56 2009
Subject:Re: script working from shell, but not from browser.
Hi,

When you run a script from shell it's probably as user 'you'.

When the script runs from a browser, it will be as user 'www' or something similar, with restricted permissions. Your shell user will have more permissions, so you might want to look at file permissions.

Also, you want to check the paths to any files referenced by the script. When runing a script as shell, you can probably access any file on the server, but user 'www' won't be able to.

If you haven't already done this, try something like:
perl -cw script-name.pl
and see if it gives any more info

Good luck!

Dave

Panchroma website development
www.panchroma.ca


On Dec 18, 2009, at 7:46 PM, simashin@gmail.com wrote:

> so, i got some script with LWP and CGI using.
> When run this script from shell - everything is ok, i got response
> with data i need from the site.
> But, when i run this script from browser i get error 500 -> "Can't
> connect to www.something.com:80 (connect: Permission denied)".
> I can`t understand how can it be... working from shell, but same
> script not working from browser. Maybe there is some problem with
> apache, but i can`t find it - the error_log is clean.
>
> i try to search the Internet but find nothing to solve this problem,
> so i decided to write here.
>
>
> --
> To unsubscribe, e-mail: beginners-cgi-unsubscribe@perl.org
> For additional commands, e-mail: beginners-cgi-help@perl.org
> http://learn.perl.org/
>
>


Navigate in group perl.beginners.cgi at sever nntp.perl.org
Previous Next


Your recent visits
Re: Dumping vars from CGI with Data::Dumper
Storing a file from a cgi parameter
Re: Auto detect timezone
Re: Web photo album, is this possible in CGI
Re: Showing errors with user input



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants