Page 1 of 1

Using curl on command line PHP

Posted: Mon Mar 17, 2008 1:46 am
by flake
I have problem in using curl. The initialisation (curl_init()) runs fine and I can get the result from curl_exec() when I execute the script through web browser. But because I need to run the script as a cron, I need to run it on command line. And strangely I get an empty string when I execute curl_exec().

Any idea? Thank you.

Re: Using curl on command line PHP

Posted: Mon Mar 17, 2008 8:04 am
by Zoxive
Look at the difference between the php.ini files. It most likely isn't enabled for cli, but you should be getting some errors if you have error reporting on.

Code: Select all

/etc/php5/cli/php.ini