3

I am developing an application that requires integration with Google APIs Client Library for PHP. I am running on LAMP stack on Ubuntu. I have the application up and running on my local host. When I integrate the code from Google API PHP client I get the following error:

PHP Fatal error: Uncaught exception 'Exception' with message 'Google CurlIO client requires the CURL PHP extension

I am unable to find help in any other forum. Can someone please point me to a solution to this. I suspect this could be somehow related to me developing and running the application in my local folder instead of var/www. I have added a file called mysite and pointing Apache to run from a local folder though.

1
  • Install php5-curl package from synaptic package manager. Commented Oct 26, 2013 at 15:33

2 Answers 2

6

CURL PHP extension is not installed on your PHP module of Apache server. You have to install it using terminal

Open Terminal (CTRL + ALT + T) and do the following command :

sudo apt-get install php5-curl

php5-curl will be automatically downloaded and installed. After Installation, Reload Apache2 Server :

sudo service apache2 reload
Sign up to request clarification or add additional context in comments.

Comments

2

Just for clarification if you are using PHP7/Any PHP version you can simply execute

sudo apt-get install php-curl

this will download the appropriate extensions for your installed PHP,

In My case it downloaded php7.2 curl

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.