FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » executing command with shell_exec()
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: executing command with shell_exec() [message #169366 is a reply to message #169365] Wed, 08 September 2010 16:38 Go to previous messageGo to previous message
jodleren is currently offline  jodleren
Messages: 7
Registered: September 2010
Karma:
Junior Member
On Sep 8, 7:21 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> On 9/8/2010 12:06 PM, cerr wrote:
>
>> Hi There,
>
>> I execute a script in my php script with shell_exec():
>>         $cmd = SCRIPT_PATH."PingGPSsource.py ".$_SESSION['prgIP']." ".
>> $_SESSION['AVLIP'];
>>         logOutput("cmd:".$cmd);
>>         $avlRet=shell_exec($cmd);
>>         logOutput("result:".$avlRet);
>
>> Now if i execute the $cmd in a normal shell, it works with no problem
>> but when i execute it through my php script, $avlRet stays empty. Why
>> is that and how can I fix this?
>> Thanks for help and suggestions!
>
>> Ron
>
> First thing I would want to know is what is in SCRIPT_PATH?  When you
> say you execute it from your php script - do you mean running under the
> web server?  If so, does the web server have access to the script and
> permission to execute it?  The web server will almost always have
> different permissions than the CLI user.
>
> Are you sure the script is actually not executing, or could it be
> executing but not producing any output?
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

It works, we just now realised the problems with filename with 2 dots.

Btw the problem is the same with file:// - so the problem is probably
on the client side, I wonder if there is anything to do about it...

Sonnich
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Php variables to an email.
Next Topic: Re: Another heredoc question
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 01:01:46 GMT 2024

Total time taken to generate the page: 0.04005 seconds