1
votes

According to the docs at https://cloud.google.com/appengine/docs/php/#dynamically_loadable_extensions and https://cloud.google.com/appengine/docs/php/config/php_ini#GAE_directives

Adding this to php.ini should load the curl extension:

extension = "curl.so"

Similarly, adding this too app.yaml should load a curlish extension:

google_app_engine.enable_curl_lite = "1"

However, when trying extension_loaded('curl') via php the results are false. At least in the development server, I have not yet tried in production.

Any ideas?

5
If you have extension = "curl.so" in php.ini, the extension is loaded automatically. curl & curl_lite can't be both enabled at the same time. You need to pick one or the other. - Mars
tried one or the other, same thing - davidkomer
Did you change runtime to php55 as suggested by piscator? - Mars
What's your development platform? Have you tried pushing the code to production? - Mars
Did you find a fix for this? I have been struggling with same problem for a few days - Edmund Rojas

5 Answers

3
votes

Per documents, the

google_app_engine.enable_curl_lite = "1"

should be in the php.ini

1
votes

I did not yet use this extension in GAE, but did you change runtime: php to runtime: php55 in app.yaml?

https://groups.google.com/forum/#!topic/google-appengine/9PMjrTxVy4w

1
votes

To use curl with google app engine you must create a php.ini file in root folder (where is app.yaml) with this code:

google_app_engine.enable_curl_lite = "1"

In the app.yaml file add php55 to runtime param:

runtime: php55
0
votes

@edmund - I solved this by removing the quote marks. I cannot explain how this makes a difference, but using MacOS and GAE I had to make php.ini include:

extension=curl.so

Cheers!

0
votes

Another possible answer is that you may have blacklisted the php.ini file in the app.yaml file :

skip_files:
- ^php\.ini$