Q: PHP auth in 2.2.0 vs. 2.2.1
Gunnar Wrobel
wrobel at pardus.de
Fri Apr 17 05:55:18 CEST 2009
Hi Albrecht,
Quoting Albrecht Dreß <albrecht.dress at lios-tech.com>:
> Hi,
>
> sorry, this is a somewhat long and off-topic question, by someone not
> having php experiences at all...
This is not off-topic at all ;) We need such a script.
>
> I'm trying to write scripts as to convert the 2.2.0 Horde prefs to
> 2.2.1. I meanwhile have a simple php script, running from the command
> line, which extracts all 2.2.0 prefs into files (serialized php
> array). Although these files look somewhat like the 2.2.1 prefs at
> first glance, a simple copy doesn't work, so I need a second script for
> re-importing the data into 2.2.1. Unfortunately, I cannot auth to the
> system, e.g. using the following simple script
>
> <snip>
> #!/kolab/bin/php -n
>
> <?php
>
> @define('AUTH_HANDLER', true);
> @define('HORDE_BASE', '/kolab/var/kolab/www/horde');
> require_once HORDE_BASE . '/lib/core.php';
> require_once HORDE_BASE . '/lib/base.php';
>
> $auth = &Auth::singleton('kolab');
> $auth->setAuth('test', array());
> var_dump($auth);
>
> ?>
> </snip>
>
> works nicely on Kolab 2.2.0 (and lets me read the Horde prefs), but
> (after replacing the path /kolab/var/kolab/www/horde by
> /kolab/var/kolab/www/client) on 2.2.1 spits out the following fatal
> error:
>
> <snip>
> A fatal error has occurred
>
> Session cookies will not work without a FQDN and with a non-empty
> cookie domain. Either use a fully qualified domain name like
> "http://www.example.com" instead of
> "http://example" only, or set the cookie domain in the Horde
> configuration to an empty value, or enable non-cookie (url-based)
> sessions in the Horde configuration.
>
> Details have been logged for the administrator.
> </snip>
>
> Before digging through tons of code, maybe some of the gurus can give
> me an example how a command line php script can authenticate as some
> user (which write access to the prefs system, but without knowing the
> password, btw.) in Kolab 2.2.1.
I guess you might just need to set the server name correctly. E.g.
$_SERVER['SERVER_NAME'] = 'kolab.example.com';
Can you open an issue about this? We still need such an upgrade script
and that way Thomas and I would help you and ourselfs to get a decent
conversion tool. It should not be too hard as you already noted. But
it would be nice if it works out of the box.
Cheers,
Gunnar
>
> Thanks in advance,
> Albrecht.
>
> _______________________________________________
> Kolab-users mailing list
> Kolab-users at kolab.org
> https://kolab.org/mailman/listinfo/kolab-users
>
--
______ http://kdab.com _______________ http://kolab-konsortium.com _
p at rdus Kolab work is funded in part by KDAB and the Kolab Konsortium
____ http://www.pardus.de _________________ http://gunnarwrobel.de _
E-mail : p at rdus.de Dr. Gunnar Wrobel
Tel. : +49 700 6245 0000 Bundesstrasse 29
Fax : +49 721 1513 52322 D-20146 Hamburg
--------------------------------------------------------------------
>> Mail at ease - Rent a kolab groupware server at p at rdus <<
--------------------------------------------------------------------
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digitale PGP-Unterschrift
URL: <http://lists.kolab.org/pipermail/users/attachments/20090417/16088420/attachment.sig>
More information about the users
mailing list