Re: script working from shell, but not from browser.
[email protected] (David Taiaroa) Fri, 18 Dec 2009 22:02:56 -0400
| Newsgroups | perl.beginners.cgi |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-1--586865259 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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=20 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, [email protected] 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. >=20 > i try to search the Internet but find nothing to solve this problem, > so i decided to write here. >=20 >=20 > --=20 > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > http://learn.perl.org/ >=20 >=20 --Apple-Mail-1--586865259--