Fatal error: Class ‘Dataface_AuthenticationTool’
Archived from the Xataface Users forum.
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
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
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?
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