Error post installation - Please help

Archived from the Xataface Users forum.

Bally — Wed Apr 06, 2011 11:02 pm

Hi,

Thanks for a wonderful script. Been trying to make it work on my localhost and it’s throwing errors please help.

Step taken:
1) created db thru phpadmin
1) unpacked script in web directory
2) ran install
3) directory ‘xatak’ created with 3 files.

when I go to “localhost/xataface/xatak” I get the following erors

Code: Select all
Fatal error: In Dataface_Table::loadTable() expected first argument to be a string but received 'Dataface_Table'On line 2333 of file C:\xampp\htdocs\xataface\Dataface\Table.php in function printStackTrace() On line 887 of file C:\xampp\htdocs\xataface\Dataface\Application.php in function loadTable() On line 1602 of file C:\xampp\htdocs\xataface\Dataface\Application.php in function handleRequest() On line 5 of file C:\xampp\htdocs\xataface\xatak\index.php in function display() in C:\xampp\htdocs\xataface\Dataface\Table.php on line 2333

Contents of index.php

Code: Select all
<?php //Main Application access point require_once "C:\\xampp\\htdocs\\xataface/dataface-public-api.php"; df_init(__FILE__, "/xataface"); $app =& Dataface_Application::getInstance(); $app->display();

Contents of conf.ini

Code: Select all
`;;Configuration settings for application
title=”xatak”

[_database]
   host=”localhost”
   name=”xatak”
   user=”root”
   password=””
   
[_tables]`

Contents of .htaccess

Code: Select all
<FilesMatch "\.ini$"> Deny from all </FilesMatch>

shannah — Thu Apr 07, 2011 10:13 am

What is in the [_tables] section of your conf.ini?


Bally — Thu Apr 07, 2011 9:13 pm

That is the whole content of conf.ini ,which was generated.
I must mention that phpmyadmin shows this only and no other tables nor content;
Database- xatak
Table- dataface
Record - database_version


shannah — Thu Apr 07, 2011 10:39 pm

That’s the problem. You have no tables listed in the [_tables] section. Check out the manual installation instructions (in either the wiki or the getting started guide) for some samples of what the [_tables] section should look like.

-Steve


Bally — Fri Apr 08, 2011 1:55 am

Got it, thank you. I was under the impression that it will prompt for making a table. It’s working like a whistle.
One other question though, how can I make a front end only for surfers displaying the tables without editing rights.


shannah — Fri Apr 08, 2011 12:04 pm

For this, you need to define permissions. Simple read-only permissions can be done by adding a getPermissions() method to your application delegate class:

Code: Select all
function getPermissions($record){     return Dataface_PermissionsTool::READ_ONLY(); }

You should probably go through the getting started tutorial to help get your feet wet. It will give you a good overview of how to lay out your applications. Once you’ve finished that tutorial, then the rest of the documentation on the wiki (and notes in this forum) should make a lot more sense.

-Steve