TimothyAURA
TimothyAURA

Reputation: 1359

App Engine PHP - cant find curl.so

Run dev_appserver.py and now get an error relating to curl.so:

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\dev\google-cloud-sdk\platform\google_appengine\php\php-5.5-Win32-VC11-x86\curl.so' - The specified module could not be found.

This file does appear to be missing from the directory specified but haven't touched anything and have not had this error before.

How do I resolve?

Additional info

I have found there is already a php.ini file in same directory as app.yaml, just a few basic lines:

extension = "curl.so"
;extension=C:\dev\xampp\php\ext\php_curl.dll
;extension=C:\dev\xampp\php\ext\php_mysqli.dll

So I changed it to comment out the first line and restore the second line:

;extension = "curl.so"
extension=C:\dev\xampp\php\ext\php_curl.dll
;extension=C:\dev\xampp\php\ext\php_mysqli.dll

The error now changes to cant find ...php_curl.dll.

Yet the file seems to be there:

enter image description here

So why the error now? seems the path to dll is correct.

Upvotes: 0

Views: 813

Answers (1)

dwelling
dwelling

Reputation: 491

If you want to use Curl and not Curl Lite, then you need to reference the .dll version while using a Windows based system. Create a php.ini file in the same directory as your app.yaml file add the following line to it:

extension = php_curl.dll

If instead you want to use curl lite, you can remove the line above and instead add:

google_app_engine.enable_curl_lite = "1"

to the php.ini file.

Upvotes: 1

Related Questions