I am using Google Cloud Shell Editor as my local development environment and I can't seem to figure out how to enable CURL. I have an app.yaml file and php.ini file in the root directory of the PHP55 project.
The question is: What is the correct way to enable CURL when using Cloud Shell Editor?
First I read that for a "local development environment", use:
extension = "curl.so"
Then I also read that for a "Windows environment", use:
extension = "php_curl.dll"
Finally, I also read that for a "production environment", use:
google_app_engine.enable_curl_lite = "1"
No matter which of these methods I try to enable CURL, I keep getting this same error:
Uncaught Error: Call to undefined function curl_init()
What am I doing wrong? How can I get CURL working in Google Cloud Shell Editor?
The following steps will generate the following warning:
You will need to repeat the install each time you startup Cloud Shell. There are scripts that can run at Cloud Shell startup to do this for you. link
/etc/php/7.2/mods-available/curl.iniwhich will be created for you.sudo apt-get install php7.2-curl