app.yaml file mistake : Call to undefined function curl_init()

别说谁变了你拦得住时间么 提交于 2019-12-12 06:55:37

问题


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


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/26832370/app-yaml-file-mistake-call-to-undefined-function-curl-init

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!