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
Re: [PHP] php selecting multiple stylesheets
cvs: pecl /phar phar.c tar.c
PHP 5.3.1 php-cgi missing from installation
RE: [PHP-WIN] What about php 5.3 and printers or PHP_PRINTER.DLL ?
Need help with a login script


  
© No Copyright
You are free to use Anything
Site Maintained by Zareef Ahmed
Powered By PHP Consultants