Results 1 to 1 of 1
Hi there,
Would anyone know why the following file will not work when executed with php?
mfd.sh
Code:
#!/bin/sh
crontab /home/dyluck/cron/mfd.txt
echo 'CRONTAB HAS BEEN UPDATED'
# end script
cronmfd.php
...
- 07-24-2010 #1Just Joined!
- Join Date
- Jul 2010
- Posts
- 1
CentOS - crontab command from .sh executed through php
Hi there,
Would anyone know why the following file will not work when executed with php?
mfd.sh
cronmfd.phpCode:#!/bin/sh crontab /home/dyluck/cron/mfd.txt echo 'CRONTAB HAS BEEN UPDATED' # end script
If I run mfd.sh from SSH : sh /home/dyluck/cron/mfd.shPHP Code:<? system('sh /home/dyluck/cron/mfd.sh',$rv);
echo $rv;
?>
it works find and updates crontab with the valuse in mfd.txt
if I run the cronmfd.php, nothing happens except the echo command.
Hopefully someone knows why this isn't working
Thanks in adance


Reply With Quote