Page 1 of 2

PostPosted: Thu Dec 07, 2006 2:35 pm
by walterbyrd
My dataface install was working, then it stopped working. I just get the error message specified in the subject line.

I would not be surprised if this was caused by my web-hoster, I don't trust them very much.

Anybody have any idea of where I would look to start fixing this?

PostPosted: Thu Dec 07, 2006 2:43 pm
by shannah
This error is caused when your conf.ini file is missing the [_tables] section.

-Steve

PostPosted: Thu Dec 07, 2006 2:52 pm
by walterbyrd
Thanks,

I don't see a config.ini file. Is that supposed to be in the root directory?

Here is what I get when I run dataface_info.php

BTW: here is what
Dataface 0.6.9r1
Installed at /dataface

Installation status INSTALLED CORRECTLY
Templates Dir ../dataface/Dataface/templates
Templates Compile Dir ../dataface/Dataface/templates_c

PostPosted: Thu Dec 07, 2006 3:18 pm
by shannah
the conf.ini file goes in your application's directory. The dataface directory is more a library than anything else... you don't generally point the browser directly to scripts inside the dataface dir.

-Steve

PostPosted: Thu Dec 07, 2006 3:22 pm
by walterbyrd
Ok. It is somewhat fixed. Except now I am just getting a wireframe, and stuff isn't laid out correctly. Maybe the template isn't working, or something.

PostPosted: Thu Dec 07, 2006 3:29 pm
by shannah
In your application's index.php file, the second parameter of your df_init() function call is supposed to be the url to the dataface directory. It is probably set wrong. You can use a full url here (e.g. http://yourdomain.com/dataface or just the path portion e.g. /path.to.dataface).

Best regards

Steve

PostPosted: Thu Dec 07, 2006 7:31 pm
by walterbyrd
This is my index.php file. I don't know if it looks right at all. It doesn't seem like I should have a '/~shannah/lesson_plans' parameter. Also, this function is init() not db_init(). Seems strange because this used to work.

require_once 'init.php';
init(__FILE__, '/~shannah/lesson_plans');
require_once 'Dataface/Application.php';


//DB_Vocabulary::register('frameworks', array('mythic'=>'Mythic','fantasy'=>'Fantasy'));
//$db = mysql_connect('www3.educ.sfu.ca','ierg','foxtrot');
//if ( ! $db ) {
// die ("Could not connect to database.");
//}
//mysql_select_db('ierg', $db);

//$action = isset( $_GET['-action'] ) ? $_GET['-action'] : (
// isset( $_POST['-action'] ) ? $_POST['-action'] : 'browse' );


$app =& Dataface_Application::getInstance();
$app->display();
//$view =& new DB_TableView('lesson_plans', $db, $action, $_GET);
//echo $view->toHtml();

PostPosted: Thu Dec 07, 2006 7:34 pm
by walterbyrd
BTW: my site does have data, it's just missing everything else.

http://system-savers.com/dataface/

PostPosted: Fri Dec 08, 2006 1:19 am
by shannah
It appears as though you have placed your application inside the dataface directory. While this will probably work, I recommend placing it in its own directory as this is how most of the installations have been set up and tested.

If you want to keep it set up the way that it is, though, the only change you should have to make is :
change '/~shannah/lesson_plans' to '/dataface'

-Steve

PostPosted: Fri Dec 08, 2006 10:46 am
by walterbyrd
Thank you. I made the change you suggested, and it looks normal now. The only problem is, that when I try to edit, I get this:

Fatal error: Call to undefined function: df_display() in /home/synet-co/public_html/system-savers/dataface/actions/edit.php on line 196

BTW: this is all just learning and testing for me, at this point. Maybe I should just blow it away, and start over? And next time I can put the application in it's own directory.

PostPosted: Fri Dec 08, 2006 11:28 am
by shannah
Oh. yes.. I think you have copied your index.php file from an older form, before i created the dataface-public-api.php file that contains all of the dataface convenience functions like df_display.

In your index.php file change:
require_once 'init.php';
to
require_once 'dataface-public-api.php';

And change the call to init() into a call to df_init() (same parameters).

This will fix it.

-Steve

PostPosted: Sat Dec 09, 2006 5:08 pm
by walterbyrd
Maybe it's the version I'm using. Those changes caused these errors:

Fatal error: Call to undefined function: db_init() in /home/synet-co/public_html/system-savers/dataface/index.php on line 22

Fatal error: Undefined class name 'dataface_application' in /home/synet-co/public_html/system-savers/dataface/index.php on line 37

PostPosted: Sun Dec 10, 2006 12:02 am
by shannah
Should be df_init() not db_init

-Steve

PostPosted: Sun Dec 10, 2006 10:14 pm
by walterbyrd
Sorry, my bad. I changed it to df_init, now I get this:

Fatal error: Call to undefined function: df_init() in /home/synet-co/public_html/system-savers/dataface/index.php on line 22

PostPosted: Mon Dec 11, 2006 12:36 pm
by shannah
Can you post your changed index.php file content. There are 2 options:

1. You didn't require dataface-public-api.php
2. You are using a very old install of dataface and should upgrade to the latest.

-Steve