![]() If you can't find the file, you might need to install curl and run the find command again. Run the above find command to locate where the curl binary is hanging out at. Ssh to your server and cd to / find / -name 'curl.so' Here's how I've fixed this on ubuntu 14.04 when curl was working in php files run through apache, but not when called from the cli. The other possibility is I could run the cronjobs through wget from the crontab file, but I've heard that's not the best option and potentially unreliable. How can I install php5-curl to just the cli, so that my server can run it and I don't have to go through a browser? Sudo apt-get install curl libcurl3 libcurl3-dev php5-curlĪfter each of these I restarted the apache2 server and still no dice, it attempted to download the file instead of opening the page. ![]() Here are the attempts I've made to install curl that have taken down PHP: sudo apt-get install php-curl The other kicker is i've been trying to install curl with apt-get onto the server (Ubuntu 12.04 php 5.4), it seems to take down my PHP as it begins to simply attempt to download the index.php file wherever I try to browse to. ![]() However when I go to the browser and dump the php_info(), the module shows up and says its correctly installed. When I run php -m the curl module does not show up. ![]() It works just fine when I hit the url from my browser, but when I run php -q myfile.phpįrom the command line, it returns PHP Fatal error: Call to undefined function curl_init() in my_cron.php on line 20 The problem is, it looks like the curl module isn't installed for my phpcli. I'm trying to set up a cronjob which requires curl, and I'm calling it directly from crontab with * * * * * /usr/bin/php myurl/my_cron.php ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |