Re: Error in exec function in php
- From: Lars Eighner <usenet@xxxxxxxxxxxxxxx>
- Date: Wed, 15 Apr 2009 13:32:27 +0000 (UTC)
In our last episode,
<3831602d-5e6e-41c8-a085-8f91dd8a10df@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, the
lovely and talented prasath_linux broadcast on comp.lang.php:
Hi friends,
I have problem in exec command in php,
I am trying to execute linux command,
rsync -avr /source_path /destination_path
This command is running in shell terminal prompt. But executing
this command through exec
exec('rsync -avr /source_path /destination_path');
in php file. This command in not running in php script.
Kindly notice the solution for this error.
Thanks in advance.
When php runs on a server, PATH is generally very restricted. You might
make this run by making the path to the command explicit:
exec('/path_to_rsync/rsync -avr /source_path /destination_path');
--
Lars Eighner <http://larseighner.com/> usenet@xxxxxxxxxxxxxxx
84 days since Rick Warren prayed over Bush's third term.
Obama: No hope, no change, more of the same. Yes, he can, but no, he won't.
.
- References:
- Error in exec function in php
- From: prasath_linux
- Error in exec function in php
- Prev by Date: Re: session with checkboxes
- Next by Date: Re: session with checkboxes
- Previous by thread: Error in exec function in php
- Next by thread: Re: Error in exec function in php
- Index(es):
Relevant Pages
|