Thursday, April 3, 2008

Installation

I've decided to update this post (done on Nov 29th) to add all the problems I've had with the installation of dataface and following that "Getting Started" tutorial. So below is a list of them:

Nothing shows up in the dataface_info.php file
So I followed the instruction on the dataface site (the getting started article), but nothing even shows up! What the? Turns out the actual file relies on short tags (ie.

session_save_path is not set
So when first setting up Dataface, I always ran into this stupid problem that it says that my session_save_path is never set...
And then it refers you to line 531 of the Application class. Here you see the code:

$sessdir = ini_get('session.save_path');
if ( !$sessdir ) $sessdir = '/tmp';
$sessdir .= "/dataface";

So basically it tries to grab the ini config value session.save_path from the php.ini file...and if it isn't set then it sets it to /tmp/dataface.

Now the thing is on windows, the session.save_path value is not set by default, so it attempts to set this to /tmp/dataface...only we are using windows and not linux (windows has paritions where linux treats the /tmp to be the root directory)

So the solution is basically just make some folder location on your windows hard drive and then in the php.ini file look for the variable session.save_path and set it to that location.

This should solve the problem.

Unable to insert a new record
So after getting past the initial steps of installing and having dataface create the front end. You can then start adding some records. But when you try to add a new record into the course table, I ended up with this sql error saying that the PDF outline column has no default value. I went into phpmyadmin and looked up the column and sure enough the column was set to not allow NULL. I guess this might have been an intended feature, but in the form no red box is beside that field to even indicate that. Maybe a bug? In any case, the solution is to simply make that column NULLABLE.

Complaining about invalid character (eg. /) in a file when it doesn't exis
I was on the trigger part of the tutorial making a course.php delegate file. But when I made the file, I originally set it as a Rich Text Document. I didn't think this would be a problem as I just renamed it into a .php extension. So did all my work and then tried to reload my wwebapp. Bam! These errors about invalid characters in my course.php. Odd...I was looked inside to find nothing and I even got rid of everything and had the basic:

class tables_Course {
}
?>


And still errors!!! And then it occurred to me that maybe when I made it as a rich text document it added some additional crap in the file that I can see. So I deleted the entire file and remade it as a plain text document (.txt) and everything worked!

No comments: