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? 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? 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. 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 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! 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
Archived
This topic is now archived and is closed to further replies.