duanjia4969 2019-02-26 21:21
浏览 56

IBM Cloud PHP入门教程 - SagException:Sag错误:Sag :: $ HTTP_NATIVE_SOCKETS不支持SSL

I am trying to complete the IBM Cloud PHP Getting started tutorial at here on a Ubuntu 16.04 LTS machine.

I installed git using

apt install git

I installed php using

apt install php

In the last step (Run your application locally.)

php -S localhost:8000

I get the following output

root@ubuntu:/home/user/get-started-php# php -S localhost:8000
PHP 7.0.33-0ubuntu0.16.04.1 Development Server started at Tue Feb 26 15:49:23 2019
Listening on http://localhost:8000
Document root is /home/user/get-started-php
Press Ctrl-C to quit.

When I access

http://localhost:8000

from a browser and enter a value for "Name" I get the error message

SagException: Sag Error: Sag::$HTTP_NATIVE_SOCKETS does not support SSL. in /home/user/get-started-php/sag/httpAdapters/SagNativeHTTPAdapter.php:29

The full message is:

[Tue Feb 26 15:50:10 2019] 127.0.0.1:53752 [200]: /
[Tue Feb 26 15:50:10 2019] 127.0.0.1:53754 [200]: /public/styles.css
[Tue Feb 26 15:50:10 2019] 127.0.0.1:53758 [200]: /public/js/lib/jquery.i18n/jquery.i18n.js
[Tue Feb 26 15:50:10 2019] 127.0.0.1:53756 [200]: /public/js/lib/jquery.i18n/jquery.i18n.messagestore.js
[Tue Feb 26 15:50:10 2019] 127.0.0.1:53760 [200]: /public/js/lib/jquery.i18n/jquery.i18n.fallbacks.js
[Tue Feb 26 15:50:10 2019] 127.0.0.1:53762 [200]: /public/js/lib/jquery.i18n/jquery.i18n.language.js
[Tue Feb 26 15:50:10 2019] 127.0.0.1:53764 [200]: /public/js/lib/jquery.i18n/jquery.i18n.parser.js
[Tue Feb 26 15:50:10 2019] 127.0.0.1:53766 [200]: /public/js/lib/jquery.i18n/jquery.i18n.emitter.js
[Tue Feb 26 15:50:10 2019] 127.0.0.1:53768 [200]: /public/js/lib/jquery.i18n/jquery.i18n.emitter.bidi.js
[Tue Feb 26 15:50:10 2019] 127.0.0.1:53770 [200]: /public/antixss.js
SagException: Sag Error: Sag::$HTTP_NATIVE_SOCKETS does not support SSL. in /home/user/get-started-php/sag/httpAdapters/SagNativeHTTPAdapter.php:29
Stack trace:
#0 /home/user/get-started-php/sag/Sag.php(987): SagNativeHTTPAdapter->useSSL(true)
#1 /home/user/get-started-php/Cloudant.php(67): Sag->useSSL(true)
#2 /home/user/get-started-php/Cloudant.php(30): Cloudant->__construct()
#3 /home/user/get-started-php/index.php(40): Cloudant::Instance()
#4 [internal function]: {closure}()
#5 /home/user/get-started-php/vendor/slim/slim/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)
#6 /home/user/get-started-php/vendor/slim/slim/Slim/Slim.php(1355): Slim\Route->dispatch()
#7 /home/user/get-started-php/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#8 /home/user/get-started-php/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#9 /home/user/get-started-php/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
#10 /home/user/get-started-php/vendor/slim/slim/Slim/Slim.php(1300): Slim\Middleware\PrettyExceptions->call()
#11 /home/user/get-started-php/index.php(70): Slim\Slim->run()
#12 {main}

Accessing the application directly on the IBM Cloud works without any issue. Only the local instance of the application gives the error.

Any help to resolve this is appreciated.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向
    • ¥15 如何用python向钉钉机器人发送可以放大的图片?
    • ¥15 matlab(相关搜索:紧聚焦)
    • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
    • ¥15 Arduino无法同时连接多个hx711模块,如何解决?