【问题标题】:Using simpleSAMLphp with Google App Engine将 simpleSAMLphp 与 Google App Engine 结合使用
【发布时间】:2014-03-01 10:07:05
【问题描述】:

我正在尝试按照https://simplesamlphp.org/docs/stable/simplesamlphp-install#section_7 上的说明将 simpleSAMLphp 与 Google App Engine 一起使用

说明 6 说配置 apache 使用:

    <VirtualHost *>
        ServerName service.example.com
        DocumentRoot /var/www/service.example.com

        Alias /simplesaml /var/simplesamlphp/www
    </VirtualHost>

我在 YAML 文件中添加了以下内容:

handlers:  
- url: /simplesaml/(.*)
  script: /var/simplesamlphp/www/\1

但我想我需要做点别的。

当我运行服务器并尝试访问 http://localhost:8081/simplesaml/ 时,我收到以下错误:

Warning: require(C:\Users\Walmsley\Documents\sso\var\simplesamlphp\www): failed to open stream: Permission denied in C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\php\setup.php on line 115

Fatal error: require(): Failed opening required '\var\simplesamlphp\www' (include_path='C:\Users\Walmsley\Documents\sso;C:\Program Files (x86)\Google\google_appengine\php\sdk') in C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\php\setup.php on line 115

我是 php 和 simpleSAML 的新手。我还尝试让 SAML 在托管在 Google App Engine 上的 Java Web 应用程序上运行,但也失败了,因为我尝试的 SAML 包使用的某些类未列入白名单。

是否可以使用 simpleSAMLphp 让 SAML 在 Google App Engine php 上运行?

如果我尝试使用 url:http://localhost:8081/simplesaml/index.php,它会重定向到 http://localhost:8081/simplesaml/module.php/core/frontpage_welcome.php

我得到了错误:

Warning: chdir(): Invalid argument (errno 22) in C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\php\setup.php on line 42

Warning: require(\var\simplesamlphp\www\module.php\core\frontpage_welcome.php): failed to open stream: No such file or directory in C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\php\setup.php on line 115

Fatal error: require(): Failed opening required '\var\simplesamlphp\www\module.php\core\frontpage_welcome.php' (include_path='C:\Users\Walmsley\Documents\sso;C:\Program Files (x86)\Google\google_appengine\php\sdk') in C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\php\setup.php on line 115

【问题讨论】:

    标签: php google-app-engine saml simplesamlphp


    【解决方案1】:

    根据您的错误消息,很可能您没有该文件夹

    C:\Users\Walmsley\Documents\sso\var\simplesamlphp\www

    确保创建它并将 PHP 脚本放在那里。

    【讨论】:

    • 那个文件夹肯定存在。它包含 6 个 php 脚本,包括 index.php
    • 听起来这个处理程序的脚本路径是错误的。此路径应从您的应用引擎项目根目录(app.yaml 文件所在的位置)开始。例如。如果目录“simplesamlphp”是项目根目录,请尝试以“www”开头的脚本路径。
    • var文件夹在根文件夹下,里面也有app.yaml文件。 var 文件夹包含 simplesamlphp 文件夹,其中包含 www 文件夹以及 simplesaml php 安装附带的一大堆其他文件夹。 www 文件夹包含 6 个 php 脚本和一堆其他文件夹
    • 根据您的 app.yaml 文件,localhost:8081/simplesaml 将导致访问脚本 /var/simplesamlphp/www/ 这显然不起作用。您需要为默认脚本添加一个处理程序,或者通过localhost:8081/simplesaml/index.php(或您的默认脚本名称)访问该站点。
    猜你喜欢
    • 2015-10-24
    • 1970-01-01
    • 2020-04-29
    • 2020-05-26
    • 2014-08-26
    • 2014-03-29
    • 2012-02-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多