fields.ini appears to be ignored

A place for users and developers of the Xataface to discuss and receive support.

fields.ini appears to be ignored

Postby tonyf » Mon Nov 30, 2009 7:34 pm

Whatever I put in fields.ini appears to be ignored. I've had a look at the post at http://xataface.com/forum/viewtopic.php?t=3899#19539, but this doesn't seem to be the problem.
I'm on Windows XP, running xataface 1.2.2

The basic access to the database is running fine, with default fieldnames etc, and styles working.

Here is my index.php :
<?php
// Include the Xataface API
require_once './xataface/dataface-public-api.php';

// Initialize Xataface framework
df_init(__FILE__, './xataface');
// first parameter is always the same (path to the current script)
// 2nd parameter is relative URL to xataface directory (used for CSS files and javascripts)

// Create a new application
$app =& Dataface_Application::getInstance();

// Display the application
$app->display()
?>

My file structure:
c:
--Program Files
----Apache Software Foundation
------Apache2.2
--------htdocs
----------slides
------------index.php
------------conf.ini
------------tables
--------------mounts
----------------fields.ini
--------------hangers
----------------fields.ini
----------------valuelists.ini
------------xataface
etc

Here is contents of conf.ini:

[_database]
host=localhost
name=slides
user=root
password=curly
[_tables]
; A list of tables to include in your application's menu
; These tables must already exist in your database
activities=Activities
collections=Collections
funding_bodies=Funders
hangers=Hangers
locations=Locations
mounts=Mounts
municipalities=Municipalities
photographers=Photographers
projections=Projections
projects=Projects
slides=Slides


Taking the table `mounts` for example, checking in phpmyadmin the table name is definitely all lower case. and the field `Mount_description` definitely has a leading cap and no others, so here is the fields.ini file contents:
[Mount_description]
widget:label = "Description"
widget:description = "Enter a description of the mount, starting with the material"

But when the table mounts is displayed, the field Mount description has the label Mount description and not Description, and there is no sign of the widget description. This is true of other fileds.ini files for other tables such as hangers too.

It's as if xataface cant find the tables directory, but I can't see where I might have gone wrong.

Many thanks from a newbie to xataface
Tony.
tonyf
 
Posts: 3
Joined: Mon Nov 30, 2009 6:49 pm
Location: Melbourne Australia

Postby Jean » Tue Dec 01, 2009 12:46 am

Tony,
I think you should use an absolute path.
Jean
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France

Postby shannah » Tue Dec 01, 2009 1:48 pm

What version of PHP are you using. There is a bug in PHP 5.3.0 that affects the parse_ini_file function and prevents the ini files from being loaded properly. AFAIK this bug is fixed in PHP 5.3.1 (and 5.2.x works fine).

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby tonyf » Tue Dec 01, 2009 7:10 pm

I was using PHP 5.3. So I installed PHP 5.3.1, but that caused my Apache 2.2 server to crash, So I upgraded to Apache 2.2.14 but this didn't help.
I'll keep muddling along and see if I can get apache up again with a PHP version other than 5.3.
Tony.
tonyf
 
Posts: 3
Joined: Mon Nov 30, 2009 6:49 pm
Location: Melbourne Australia

Postby tonyf » Wed Dec 02, 2009 4:16 pm

Finally got PHP 5.3.1 working with Apache. I'm not really clear what the problem was with installation, but anyway the problem I was having with xataface not seeing the fields.ini files has been fixed by upgrading from PHP 5.3 to 5.3.1 as was suggested by Steve - thanks for the info.
Tony.
tonyf
 
Posts: 3
Joined: Mon Nov 30, 2009 6:49 pm
Location: Melbourne Australia

Postby shannah » Thu Dec 03, 2009 10:37 am

Thanks for confirming that that fixed the problem Tony. Good to know.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 12 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved