0

I can't find the simple mistake in my app.yaml file.,, I am a new in python and google app engine ,,, when i run or deploy it works and css folder work ,but when I click to send post to getvideo.php ,, I think it is a problem in definition of curl.php Because it gives me :-

Fatal error: Call to undefined function curl_init() in C:\Users-----\Desktop\YTD\curl.php on line 9

this my app.yaml

application: isdarat-is
version: 2
runtime: php
api_version: 1


handlers:
- url: /
  script: index.php

- url: /config.php
  script: config.php

- url: /curl.php
  script: curl.php

- url: /download.php
  script: download.php

- url: /getimage.php
  script: getimage.php

- url: /getvideo.php
  script: getvideo.php

- url: /ytdl.user.js
  script: ytdl.user.js

- url: /css/
  static_dir: css

and this is php script source https://github.com/jeckman/YouTube-Downloader

2 Answers2

2

Since 2015 PHP curl calls are supported as long as you take these steps

In app.yaml make sure the php version is correct

runtime: php55

If it doesn't exist create php.ini in the same location as app.yaml and add this line

google_app_engine.enable_curl_lite = 1

Now it will work both in dev and production environments.

Fakeer
  • 985
  • 1
  • 13
  • 29
0

native curl is not supported by app engine since curl requires an app to open a specific port which is done differently when using app engine platform via Sockets API.

If you're just accessing a data via a basic GET and POST using curl, you might want to check URLFetch PHP API.

phucat
  • 54
  • 4