0

I am trying to use simpleSAMLphp with Google App Engine by following the instructions on https://simplesamlphp.org/docs/stable/simplesamlphp-install#section_7

Instruction 6 says to configure apache using:

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

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

I have added the following to the YAML file:

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

But I think I need to do something else.

When I run the server and try to visit http://localhost:8081/simplesaml/ I get the following error:

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

I am new to php and simpleSAML. I also tried getting SAML working on my Java web app hosted on Google App Engine, but failed there as well, as some of the classes used by the SAML packages I tried were not whitelisted.

Should it be possible to get SAML working on Google App Engine php using simpleSAMLphp?

If I try the url: http://localhost:8081/simplesaml/index.php it redirects to http://localhost:8081/simplesaml/module.php/core/frontpage_welcome.php

And I get the error:

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
Mike
  • 3,855
  • 5
  • 30
  • 39

1 Answers1

0

Based on your error message, most likely you don't have the folder

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

Make sure you create it and put the PHP scripts there.

4b0
  • 21,981
  • 30
  • 95
  • 142
Mars
  • 1,422
  • 8
  • 9
  • That folder definitely exists. It contains 6 php scripts in it, including index.php – Mike Mar 02 '14 at 07:44
  • It sounds like the script path for this handler is wrong. This path should start from your app engine project root directory (where the app.yaml file is). E.g. if the directory 'simplesamlphp' is the project root, try a script path that starts with 'www'. – Amy U. Mar 02 '14 at 20:25
  • The var folder is in the root folder, which also contains the app.yaml file. The var folder contains the simplesamlphp folder, which contains the www folder as well as a whole bunch of other folders that come with the simplesaml php install. The www folder contains 6 php scrips and a bunch of other folders – Mike Mar 02 '14 at 23:22
  • Based on your app.yaml file, http://localhost:8081/simplesaml/ will result in accessing the script /var/simplesamlphp/www/ which clearly won't work. You'll need to either add a handler for the default script, or access the site via http://localhost:8081/simplesaml/index.php (or whatever your default script is named). – Mars Mar 03 '14 at 06:53