php - Crontab not executing script with cURL -


i have cron that's set run every ten minutes works fine if execute file manually entering

php register.php 

but, cron not execute file once includes curl related. cron follows

*/10 * * * * /usr/bin/php /var/www/html/register.php  

i know cron getting correct file because @ top of it, put php's mail function send me email know executed. but, curl related not execute. there aren't global variables or server variables in script, isn't reason. i've checked both crontab , php error logs , nothing there pertaining issue.

try add @ beginning of script:

chdir(dirname(__file__)); 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -