Problem with Login after enabling autenication

A place for users and developers of the Xataface to discuss and receive support.

Problem with Login after enabling autenication

Postby Buchs9999 » Wed Mar 09, 2011 1:11 am

Hi,

I'm in the Autentication function test. After I made the configuration as it is described in the example. Do I get the following error message. What is wrong here?

Fatal error: In Dataface_Table::loadTable() expected first argument to be a string but received 'Dataface_Table'On line 2359 of file C:\xampp\htdocs\xataface\Dataface\Table.php in function printStackTrace()
On line 29 of file C:\xampp\htdocs\xataface\Dataface\Serializer.php in function loadTable()
On line 135 of file C:\xampp\htdocs\xataface\Dataface\AuthenticationTool.php in function Dataface_Serializer()
On line 216 of file C:\xampp\htdocs\xataface\Dataface\AuthenticationTool.php in function checkCredentials()
On line 1551 of file C:\xampp\htdocs\xataface\Dataface\Application.php in function authenticate()
On line 5 of file C:\xampp\htdocs\xataface\getit\index.php in function display()
in C:\xampp\htdocs\xataface\Dataface\Table.php on line 2359
Buchs9999
 
Posts: 6
Joined: Mon Mar 07, 2011 6:03 am

Re: Problem with Login after enabling autenication

Postby shannah » Wed Mar 09, 2011 12:19 pm

Strange. More info might shed some light. e.g.
xataface version.
conf.ini relevant settings.
portions of delegate classes where you are using Authentication Tool.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Problem with Login after enabling autenication

Postby Buchs9999 » Thu Mar 10, 2011 12:32 am

The problem occurred after the switch on the authentication. Before that, everything works.
I use my own "user tables. But I think it should be no problem.

I use Xataface in German and English. German is the first language.
By the way, I've made some adjustments to the de.ini. I do I'll send them to you?

I hope that's enough for now? Excuse my English, I know it could be better :( .

Thanks for the reply, you have made a great system :D
Greetings Thomas

Here is my configuration:

Environement
===============================================
Windows 7 (64Bit)
XAMPP 1.7.4
PHP: 5.3.5
Apache/2.2.17 (Win32)
MySQL 5.5.8
Xataface 1.2.6


conf.ini
===============================================
Code: Select all
;;default_browse_action="edit"
default_language="de"
default_table="get_services"
title="get Info"
;;multilingual_content=1
cache_queries=1

[_auth]
user_table = xsys_users
username_column = xsys_users_loginName
password_column = xsys_users_password
auth_type = basic

[languages]
en="English"
de="Deutsch"

[history]
enabled = 1

[_database]
host = "localhost"
user = "****"
password = "******"
name = "*****"

[_tables]
get_services = "Services"
view_services_aktueller_werte_eingeben = "Aktuelle KPI Werte (Service)"
... some Tables ...
...



ApplicationDelegate.php
================================================================
Code: Select all
<?php
/**
* A delegate class for the entire application to handle custom handling of
* some functions such as permissions and preferences.
*/
class conf_ApplicationDelegate {
    /**
     * Returns permissions array.  This method is called every time an action is
     * performed to make sure that the user has permission to perform the action.
     * @param record A Dataface_Record object (may be null) against which we check
     *               permissions.
     * @see Dataface_PermissionsTool
     * @see Dataface_AuthenticationTool
     */
     function getPermissions(&$record){
         $auth =& Dataface_AuthenticationTool::getInstance();
         $user =& $auth->getLoggedInUser();
         if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
             // if the user is null then nobody is logged in... no access.
             // This will force a login prompt.
         $role = $user->val('Role');
         return Dataface_PermissionsTool::getRolePermissions($role);
             // Returns all of the permissions for the user's current role.
      }
}
Buchs9999
 
Posts: 6
Joined: Mon Mar 07, 2011 6:03 am

Re: Problem with Login after enabling autenication

Postby Buchs9999 » Thu Mar 10, 2011 4:19 am

One thing I forgot, maybe it is important.
i had to change in the php.ini the line error_reporting = E_ALL | E_STRICT to error_reporting = E_ALL & ~E_NOTICE then it was working.
Buchs9999
 
Posts: 6
Joined: Mon Mar 07, 2011 6:03 am

Re: Problem with Login after enabling autenication

Postby shannah » Thu Mar 10, 2011 2:54 pm

The user_table directive should be "users_table".

Hopefully that gets it working.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Problem with Login after enabling autenication

Postby shannah » Thu Mar 10, 2011 2:55 pm

And for contributing to the translations, please check out this page:
http://xataface.com/wiki/Contribute_to_ ... on_Project
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Problem with Login after enabling autenication

Postby Buchs9999 » Fri Mar 11, 2011 12:29 am

Thank you very much, now it works as expected. :D
As I have said, you did a great system. It's exactly what I've been looking for.

Für die Übersetzung schicke ich dir ein Mail, ich denke dort kann ich helfen. Mein deutsch ist besser als mein englisch.

Greetings
Buchs9999
 
Posts: 6
Joined: Mon Mar 07, 2011 6:03 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 21 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved