cron question

Tim H bizdev at pwnspeak.com
Sun Jul 25 20:38:03 UTC 2010


william drescher wrote:
> when I run a program from a user cron, from what directory is it 
> run ?
> eg: crontab
> */5 * * * * /usr/bin/php /home/william/prog/myprog.php
> 
> will it run from /home/william or from /home/william/prog/ ?
> 
> bill
> 
> 

Any PHP scripts should run according to the doc_root setting and 
user_dir settings in the php.ini config file.

By default these are left blank so the script will run relative to the 
script itself, AKA /home/william/prog/.

Tim H.




More information about the ubuntu-users mailing list