Fatal error: Class 'Dataface_AuthenticationTool'

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

Fatal error: Class 'Dataface_AuthenticationTool'

Postby clawes » Fri Jun 22, 2012 10:26 am

I am trying to implement user registration on my application and I'm seeing the following error:

Fatal error: Class 'Dataface_AuthenticationTool' not found in /var/www/departed/index.php on line 20


..after adding the following statement to my index.php file.

Code: Select all
..
$auth =& Dataface_AuthenticationTool::getInstance();

How I can fix this?

It also appears that Xataface is ignoring the <myapp>/conf/ApplicationDelegate.php file.
To remedy this, I have to create a new file named <myapp>/functions.inc.php, copy the contents of ApplicationDelegate.php to this file, then call ( require_once) this file from the index.php file. This is contrary to how the Application Delegate class is documented. What am I missing?
clawes
 
Posts: 22
Joined: Mon May 07, 2012 12:02 pm

Re: Fatal error: Class 'Dataface_AuthenticationTool'

Postby shannah » Fri Jun 22, 2012 10:32 am

Unfortunately you can't do it this way. The df_init() method performs some bootstrap code that sets up the include paths and environment. If your ApplicationDelegate class isn't being found then you are setting yourself up for more problems by ignoring this. You need this class for many different purposes.

Remember that the path is case sensitive. So is the class name.

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

Re: Fatal error: Class 'Dataface_AuthenticationTool'

Postby clawes » Fri Jun 22, 2012 11:01 am

How is this related to my 1st issue?

Shouldn't the 'Dataface_AuthenticationTool' class be defined in the /var/www/html/dataface/dataface-public-api.php?
clawes
 
Posts: 22
Joined: Mon May 07, 2012 12:02 pm

Re: Fatal error: Class 'Dataface_AuthenticationTool'

Postby shannah » Fri Jun 22, 2012 11:10 am

The Dataface_AuthenticationTool is loaded if you have turned on authentication in the conf.ini file by adding an [_auth] section.
If you need to use it otherwise, you'll need to import Dataface/AuthenticationTool.php.

You probably shouldn't be using it in the index.php file - it can't be used properly until df_init() has finished running bootstrap code.

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


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 1 guest

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