Home  |  Linux  | Mysql  | PHP  | XML
From:alexander simashin Date:Sat Dec 19 07:18:24 2009
Subject:Re: script working from shell, but not from browser.
2009/12/19 David Taiaroa

>
> 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.
>

Of course , it is running under user apache. But i made all chmod and chown
what need, i think.

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.
>

This is okay too, the script only reads config file which has the right
permissions.
I try to exec script from apache user from shell, after making "su -l apache
-s /bin/bash" in console, and it ran perfect... But again - from browser we
got an error.

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

This gives me - "syntax OK"

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


Your recent visits
Good news!
Re: Showing errors with user input
Re: Showing errors with user input
Re: Storing a file from a cgi parameter
Re: content type headers



  
© 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