meeting-room-booking-system / mrbs-code

MRBS application code
Other
129 stars 64 forks source link

Cant configure any authentication method #959

Closed jberanek closed 1 year ago

jberanek commented 13 years ago

Hello, I have installed and running MRBS but cant configure any auth method. Not even "none" is working. I also tried the standard config with administrator and secret but no user works. What am I doing wrong???

Reported by: *anonymous

Original Ticket: mrbs/support-requests/215

jberanek commented 13 years ago

Can you post your config file (with any sensitive data such as database usernames and passwords omitted)?

Thanks,

Campbell

Original comment by: campbell-m

jberanek commented 13 years ago

Thanks Campbell.

This is the last I tried. I have tried different options, but none working.

<?php

// $Id: config.inc.php 1825 2011-05-14 09:37:11Z cimorrison $

/**

// The timezone your meeting rooms run in. It is especially important // to set this if you're using PHP 5 on Linux. In this configuration // if you don't, meetings in a different DST than you are currently // in are offset by the DST offset incorrectly. // // When upgrading an existing installation, this should be set to the // timezone the web server runs in. See the INSTALL document for more information. // // A list of valid timezones can be found at http://php.net/manual/timezones.php // The following line must be uncommented by removing the '//' at the beginning $timezone = "America/Monterrey";

unset($auth["admin"]); $auth["type"] = "config" ; $auth["admin"][]="administrator"; $auth["user"]["administrator"]="secret";

/***

/ Add lines from systemdefaults.inc.php and areadefaults.inc.php below here to change the default configuration. Do NOT modify systemdefaults.inc.php or areadefaults.inc.php. /

// This next section must come at the end of the config file - ie after any // language and mail settings, as the definitions are used in the included file // // IMPORTANT NOTE: Do NOT put any configuration apart from the "Entry Types" // below this section require_once "language.inc"; // DO NOT DELETE THIS LINE

/*****

// This array maps entry type codes (letters A through J) into descriptions. // // Each type has a color which is defined in the array $color_types in the Themes // directory - just edit whichever include file corresponds to the theme you // have chosen in the config settings. (The default is default.inc, unsurprisingly!) // // The value for each type is a short (one word is best) description of the // type. The values must be escaped for HTML output ("R&D"). // Please leave I and E alone for compatibility. // If a type's entry is unset or empty, that type is not defined; it will not // be shown in the day view color-key, and not offered in the type selector // for new or edited entries.

// $typel["A"] = "A"; // $typel["B"] = "B"; // $typel["C"] = "C"; // $typel["D"] = "D"; $typel["E"] = get_vocab("external"); // $typel["F"] = "F"; // $typel["G"] = "G"; // $typel["H"] = "H"; $typel["I"] = get_vocab("internal"); // $typel["J"] = "J";

?>

Original comment by: *anonymous

jberanek commented 13 years ago

Mmm. Everything looks OK. I'll think about this to see what could possibly be going wrong. I assume the problem you're seeing is that you can't login as administrator? How do you know that it';s not working? In other words, what message do you see on the screen?

Campbell

Original comment by: campbell-m

jberanek commented 13 years ago

When I try to define meeting rooms, and login as administrator, I got the "your not authorized to modify this information".

Original comment by: *anonymous

jberanek commented 13 years ago

Ah - one possibility is that your PHP sessions aren't configured properly. (If you're using the php session type, MRBS stores the username as a session variable. So it's possible that you're able to login, but MRBS can't subsequently retrieve your username). To test this theory can you try configuring MRBS to use the cookie session scheme instead of PHP by setting

$auth["session"] = "cookie";

If this works then you'll need to check your PHP session configuration in php.ini. One common problem is that the temp directory nominated to store session information is not writable.

Campbell

Original comment by: campbell-m

jberanek commented 13 years ago

Yeap. That made the trick.

What is that varianble name? (Im new to the PHP word)

Thanks a lot!!

Original comment by: *anonymous

jberanek commented 13 years ago

Good - glad we know what the problem is now. It's nothing to do with MRBS, but a problem with the way PHP has been configured on your system. If you're responsible for your server, then find the file php.ini and search for "session" - there are full instructions in the comments. If not, contact your system administrator or web hosting company and tell them that PHP can't use session variables properly.

Campbell

Original comment by: campbell-m

jberanek commented 13 years ago

Thanks Campbell!

Original comment by: *anonymous