class loading error: Class 'SimpleSAML_Auth_Simple' not found

1,061 views
Skip to first unread message

adam wilson

unread,
Jan 21, 2014, 7:44:10 AM1/21/14
to simple...@googlegroups.com
First of all let me say I had SimpleSAML working perfectly using Alias directives on my local machine.

The website I am working on is on a Plesk shared hosting service and tricky to add the Alias directives, esp as atm its all on one live server.. my boss asked me to try get it working without, or with .htaccess

So I am trying to work out how get SimpleSAML working by splitting the www folder into /simplesaml and have the /simplesamlphp alongside it, and dont allow public access to simplesamlphp, or even have it deeper in the folder structure on the server. Currently just trying to get this working on my local machine.

So the folder structure is

/simplesaml <- public
/simplesamlphp <- private

The application is using CodeIgniter.

In simplesaml/_include.php I have changed the following lines:

Near the beginning:
require_once(dirname(dirname(__FILE__)) . '/simplesamlphp' . '/lib/_autoload.php');

At the end:
$configdir = dirname(dirname(__FILE__)) . '/simplesamlphp' . '/config';


my config.php file has the following:

    'baseurlpath'           => 'simplesaml/',
    'basedir'                => '~/work/mysite/simplesamlphp/',
    'certdir'               => 'cert/',
    'loggingdir'            => 'log/',
    'datadir'               => 'data/'


I have verified that all folders and files exist. it still does not seem to be loading properly.

When going via the application (which uses an autoloader) I get an error "Class 'SimpleSAML_Auth_Simple' not found"
When I go to /simplesaml I get " Class 'SimpleSAML_Error_Assertion' not found in .../work/mysite/simplesaml/_include.php on line 35"


I have been going around in circles with this, so any help would be much appreciated.

Kind Regards
Adam

Peter Schober

unread,
Jan 21, 2014, 8:26:56 AM1/21/14
to simple...@googlegroups.com
* adam wilson <adam.el...@gmail.com> [2014-01-21 14:15]:
> First of all let me say I had SimpleSAML working perfectly using Alias
> directives on my local machine.
>
> The website I am working on is on a Plesk shared hosting service and tricky
> to add the Alias directives, esp as atm its all on one live server.. my
> boss asked me to try get it working without, or with .htaccess

Knowing nothing about Plesk and what that offers: Do you have shell
access and does the filesystem support symbolic links? If so, you
could place a link to SSP's www folder inside the publicly available
web content.
user@host:~/public_html $ ls -d simplesaml
simplesaml -> /path/to/simplesamlphp/www

> So the folder structure is
>
> /simplesaml <- public
> /simplesamlphp <- private

Very confusing naming convention but your choice.

> 'baseurlpath' => 'simplesaml/',
> 'basedir' => '~/work/mysite/simplesamlphp/',
> 'certdir' => 'cert/',
> 'loggingdir' => 'log/',
> 'datadir' => 'data/'

You could try avoiding ~ to signyfy $HOME, with either a relative or
absolute path. Not sure this will make any difference.
-peter

adam wilson

unread,
Jan 21, 2014, 12:41:27 PM1/21/14
to simple...@googlegroups.com, peter....@univie.ac.at
Thanks for your help with this.

We tried some stuff with .htaccess which ended up causing infinite redirects, but I found an example for Wordpress which seems to be almost working: https://github.com/HTML24/WAYF/wiki/Install-simpleSAMLphp

The rewrite rule is:  RewriteRule ^simplesaml/(.*) /simplesamlphp/www/$1 [L]

I have gone back to the default dir structure and put the simplesamlphp folder in the root of the web folder. 

We now get the following error: 

... module.php: 180 (N/A)
Caused by: Exception: Destination in response doesn't match the current URL. Destination is "https://subdomain.site.com/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp", current URL is "https://subdomain.site.com/simplesamlphp/www/module.php/saml/sp/saml2-acs.php/default-sp".

We've also had some instances where it was redirecting back as http:// rather than https://

Any pointers much appreciated!

Thank you

Peter Schober

unread,
Jan 21, 2014, 1:51:50 PM1/21/14
to simple...@googlegroups.com
* adam wilson <adam.el...@gmail.com> [2014-01-21 18:41]:
> The rewrite rule is: RewriteRule ^simplesaml/(.*) /simplesamlphp/www/$1 [L]

That indicates that the whole SimpleSAMLphp installation is still
exposed via the webserver. I thought the whole idea was to prevent
this?

Also you didn't comment on whether symbolic links are available on the
hosts' filesystem or not:
http://simplesamlphp.org/docs/stable/simplesamlphp-install#section_13

Probably not, as what you wrote in our first email seems to be from
http://simplesamlphp.org/docs/stable/simplesamlphp-install#section_13_1

As that's a documented way for deployment and does not assume any
specific function on the web host I would expect that should work
pretty much anywhere.
So I would test that with SimpleSAMLphp alone, not involving the other
application and its autoloader. Only once that works move on to
integration with the application/framework.
-peter

adam wilson

unread,
Jan 22, 2014, 4:19:37 AM1/22/14
to simple...@googlegroups.com, peter....@univie.ac.at
Yes, in this case we would hide the simplesamlphp folder.
Anyhow, looking at symlinking it should be possible on the server, its running CentOS, I will test it locally first and then try it on the server. Should have tried that method before.. 

Otherwise I will continue with the second method first testing the application on its own.

Thanks for the tips.. 
Adam

adam wilson

unread,
Jan 22, 2014, 9:34:06 AM1/22/14
to simple...@googlegroups.com, peter....@univie.ac.at
Just to update you - I followed the instructions for the symlink method and it worked beautifully - mimicked this on the server and just had to add the simplesamlphp folder to the php open_basedir directive, and it now works on the server too :)

Thanks for pointing that out. 

Kind Regards
Adam
Reply all
Reply to author
Forward
0 new messages