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 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 有没有帮写代码做实验仿真的
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥30 vmware exsi重置后登不上
    • ¥15 c++头文件不能识别CDialog
    • ¥15 Excel发现不可读取的内容
    • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题
    • ¥20 yolov5自定义Prune报错,如何解决?
    • ¥15 电磁场的matlab仿真