matfish Posted May 7, 2010 Share Posted May 7, 2010 Hi there, I'm using cURL in a PHP script which works fine. But I get the following error when trying via command line: curl "http://www.domain.com/script.php" -bash: curl: command not found So I'm unable to run a crontab which invokes curl to ping a script? Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/200990-bash-curl-command-not-found/ Share on other sites More sharing options...
trq Posted May 7, 2010 Share Posted May 7, 2010 Is curl installed? Quote Link to comment https://forums.phpfreaks.com/topic/200990-bash-curl-command-not-found/#findComment-1054527 Share on other sites More sharing options...
matfish Posted May 7, 2010 Author Share Posted May 7, 2010 sudo apt-get install curl the above says latest version is installed. Quote Link to comment https://forums.phpfreaks.com/topic/200990-bash-curl-command-not-found/#findComment-1054529 Share on other sites More sharing options...
trq Posted May 7, 2010 Share Posted May 7, 2010 cron usually has a limited path, so you may need to provide it the full path to curl. eg; 5 * * * * /usr/bin/curl http://blah.com Quote Link to comment https://forums.phpfreaks.com/topic/200990-bash-curl-command-not-found/#findComment-1054532 Share on other sites More sharing options...
matfish Posted May 7, 2010 Author Share Posted May 7, 2010 Mentioned the issue to my hosting company, all of a sudden everything works! Quote Link to comment https://forums.phpfreaks.com/topic/200990-bash-curl-command-not-found/#findComment-1054657 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.