Page 1 of 1

Fatal error: Class 'Dataface_Error' not found

PostPosted: Tue Apr 29, 2008 7:28 am
by fantomasdm
Hi !!
I get this error on my application:
Fatal error: Class 'Dataface_Error' not found in /var/www/vhosts/youtraffic.it/httpdocs/xataface/Dataface/Application.php on line 620

file config.ini:
[_database]
host = "localhost"
user = "joomladb"
password = "******"
name = "joomla"

[_tables]
Course = "chat"

index.php:

require_once '../xataface/dataface-public-api.php';
df_init(__FILE__, 'http://www.youtraffic.it/xataface');
$app =& Dataface_Application::getInstance();
$app->display();

usingdataface 1.0 beta2.
Thanks for help!!

PostPosted: Tue Apr 29, 2008 12:35 pm
by fantomasdm
HI!
I have comment line 620, Dataface_Error::printStackTrace is now a string!
set ini_set('session.save_path', 'tmp') in writable dir and set
cache_dir = "/tmp" in same dir.

now the problems is the same that I have find on other application.
PHP going in crash and in apache log I can see only that process is abnormal terminate. When I can copy log I paste here! Thanks for help!

here there is dataface_info and phpinfo
http://www.youtraffic.it/xataface/dataface_info.php
...Is possible that php version is not good (5.0.4)

PostPosted: Wed Apr 30, 2008 9:55 am
by shannah
It should be able to find the Dataface_Error class. Check the permissions on the Dataface/Error.php file to make sure it is readable by the webserver.

I would uncomment the Dataface_Error::printStackTrace() line and focus on getting it to recognize the Dataface_Error class because if it won't then there is probably something else wrong too.

In your debugging you might also want to check on the include path just before it calls Dataface_Error::printStackTrace()
e.g.
Code: Select all
echo ini_get('include_path');

PostPosted: Mon Jun 16, 2008 1:44 pm
by sophistry
Hey, I wanted to mention that I'm getting this error on a xataface installation I have on an IIS machine. I'm not sure what the issue is, but I'm also finding that if I refresh the page several times, the application recovers, and I don't have an issue for a few minutes, then the error re-appears.

I added in the line:

Code: Select all
echo ini_get('include_path');


before the line:
Code: Select all
".Dataface_Error::printStackTrace()."</div>";


into Dataface/Application.php, and I'm still getting an identical error. Very little has been changed in this install (most recent beta).

PostPosted: Mon Jun 16, 2008 2:12 pm
by sophistry
I think I may have somewhat of an explanation.

Ultimately, it seems like Dataface couldn't write to the Temp directory, which on IIS was c:\windows\temp - I'm not admin on this machine, and was therefore denied access.

The tricky part was, there wasn't enough data on the error to go on, and it happened somewhat sporadically. After I removed ".Dataface_Error::printStackTrace()." from the line completely, I got a proper error explaining that it couldn't save temp files and gave me the directory.

So, in the application's index.php, I added a line near the top:

Code: Select all
session_save_path('C:\Inetpub\tempfiles');


A directory I created, and it seems to have done the trick. I'll try putting the Dataface_Error line back in and see if it still chokes, but I'd much rather prefer seeing the full error if it happens again.

PostPosted: Mon Jun 16, 2008 2:38 pm
by shannah
Thanks for posting this. I've pretty much given up testing on IIS, so there may indeed be issues with IIS compatibility. Posts like this should help others to find their way through the bugs when they are encountered.

_Steve