EasyPHP
EN FR
>download >components >modules >blog >forum >faq >screenshots >introduction

For Windows Vista/Seven issues, please read the FAQ or leave a detailed message

Go to Topic: PreviousNext
Go to: Message ListNew TopicSearchLog InPrint View

Using cURL in CLI



Posted by: flo234
June 22, 2009 07:36PM
Hi,

I'm pretty new to scripting with CLI and I have a problem with cURL :)

When I use phpinfo() while in "normal mode" everything is OK:
curl
cURL support enabled
cURL Information libcurl/7.16.0 OpenSSL/0.9.8i zlib/1.2.3

And everything work (I can browse a remote file without any problem, and grab information from a xml file for exemple).

But while using cURL in my CLI script (which is a little "bot" for irc) I have this error "Fatal error: Call to undefined function curl_init()" so I think i missed something !

I searched on google and didn't find any informations that helps me, so I hope your knowledge will be helpfull :)
(for your information i'm using easyphp 3.0, and i already modified php.ini in order to have curl OK in normal mode at least)

Ps: Sorry for my English



Edited 1 time(s). Last edit at 06/22/2009 07:37PM by flo234.

Options: ReplyQuote
Posted by: Amour
June 23, 2009 07:57AM
With CLI, you must specify where is php.ini : the "-c" (+ path) option is your friend ;)

Options: ReplyQuote
Posted by: flo234
June 25, 2009 11:44AM
Oh, yes you were right, when using -m or --ini i saw that curl was not running while using cli (and that my custom php.ini file wasn't properly loaded)

Everything is ok with the good php.ini specified :) (or by puting the php.ini in /windows dir as it was the defaut location)

Thank you!

Options: ReplyQuote


Go to: Message ListSearchLog In
Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.