Jennifer
Jennifer

Reputation: 1331

php module/library in c9

Anyone here uses c9 (https://c9.io/)? How can I install the php module/library in c9? Is there a relation between the module/library and this $ch = curl_init(); for having an error of Call to undefined curl_init() Because, I just copy-paste a code that was given to me, and I have an error like that. I seriously don't know anything about this, I've googled it but nothing seems to answer my question.

Upvotes: 1

Views: 866

Answers (1)

basdw
basdw

Reputation: 486

There is indeed a relation between the call and the library, or in this case the absence of the CURL library. PHP supports many built-in functions, but for using third party libraries often a module needs be installed/included. To make curl functions work in Cloud9, execute following (without the quotes) from the terminal:

sudo apt-get install php5-curl

That should make the PHP code work.

Upvotes: 3

Related Questions