Can anyone explain why this line works when called from shell, but fails when called via crontab?
passthru("tar xvf $file $tarfile/application $tarfile/application_detail $tarfile/application_device_type $tarfile/genre_application");
}
The error I got emailed after cron was
tar: itunes20100907/application: Cannot open: No such file or directory itunes20100907/application_detail
As the error says, you must be in the wrong directory. You should use the canonical path.
Note: When safe mode is enabled, you can only execute files within the safe_mode_exec_dir . For practical reasons, it is currently not allowed to have .. components in the path to the executable.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.