Fatal Error

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

Fatal Error

Postby gstarke » Tue May 11, 2010 6:08 am

Hi
I have been looking for a way to rebuild my highly developed filemaker DB to run on "the cloud" on our mysql server, and discovered xataface! I have optomistically downloaded and installed the program folder on the server, followed the instructions as to how to set up a new app... sorted through some referencing issues for the right directory etc, and access rights to the mysql database and then encountered the following error:
"Fatal error: Call to undefined method PEAR_Error::getField() in /home/stistih/public_html/dataface/Dataface/Table.php on line 2629"
This looks to me like a mismatch in the programming and our server.
The server is hosted, but as far as I am aware is Apache, PHP 5+ & MySQl.
Is there an easy solution to this?
Regards
Graeme
gstarke
 
Posts: 10
Joined: Tue May 11, 2010 2:38 am

Re: Fatal Error

Postby shannah » Tue May 11, 2010 6:12 am

This error indicates that you are trying to access a field that doesn't exist. Are you working with the minimal install (conf.ini and index.php)? If so can you post your conf.ini and index.php files (comment out passwords etc..) There is likely a problem here. If you you've defined delegate classes there could be a problem in there also.

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

Re: Fatal Error

Postby gstarke » Tue May 11, 2010 6:42 pm

Hi Steve
Thanks for the prompt response.
Yes, I have been using the minimal install just to get started.

My conf.ini is:
[_database]
host = "localhost"
user = "*******"
password = "*******"
name = "stistih_IrlenDBWeb"

[_tables]
Clients = "Clients"

My index.php is:
<?
require_once '../dataface/dataface-public-api.php';
df_init(__FILE__, 'http://homelearn.com.au/dataface');
$app =& Dataface_Application::getInstance();
$app->display();
?>

The dataface folder is in public_html directory and a folder called IrlenDBWeb is in the same directory and it contains the index.php and conf.ini
When I browse to http://www.homelearn.com.au/IrlenDBWeb that's when I get that error.
If I browse to http://www.homelearn.com.au/dataface the installer.php asks for mysql username and password, but I put in the ones I have registered (using cPanel) and it does not accept them. Is this because it has already installed? (the run-once)
gstarke
 
Posts: 10
Joined: Tue May 11, 2010 2:38 am

Re: Fatal Error

Postby shannah » Tue May 11, 2010 7:11 pm

You might want to double check the name of the "Clients" table. In Xataface it is case sensitive. I.e. if your table is actually named 'clients' and not 'Clients' then you could get an error like you described.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Fatal Error

Postby gstarke » Wed May 12, 2010 1:05 am

Nope. Not that. I checked and it's definitely capital letter start.
The table has no records at the moment but does have 28 fields which may or may not have been fully defined properly.
(I'm a novice with mysql). Would that do it?
gstarke
 
Posts: 10
Joined: Tue May 11, 2010 2:38 am

Re: Fatal Error

Postby shannah » Wed May 12, 2010 10:39 am

Please post the SQL definition of your Clients table.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Fatal Error

Postby gstarke » Wed May 12, 2010 7:13 pm

Hi Steve
It was manually entered with phpMyAdmin.

A copy of the page with table fields follows:
(Is this readable enough?)
Field Type Collation Attributes Null Default Extra Action
Initial Testing date No None Browse distinct values Change Drop Primary Unique Index Fulltext
Firstname varchar(20) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Surname varchar(20) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Address varchar(50) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Suburb varchar(20) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
State varchar(3) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Postcode varchar(4) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Parent Names varchar(20) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Telephone varchar(10) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Mobile varchar(10) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
D.O.B. date No None Browse distinct values Change Drop Primary Unique Index Fulltext
Refered varchar(20) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Optom varchar(20) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Script varchar(10) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Date of Lens Test date No None Browse distinct values Change Drop Primary Unique Index Fulltext
Initial Tint varchar(30) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Retest Date date No None Browse distinct values Change Drop Primary Unique Index Fulltext
Change of Tint varchar(30) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Problem varchar(50) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Patterns varchar(50) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Overlays varchar(30) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Paper varchar(20) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
Reading decimal(10,0) No None Browse distinct values Change Drop Primary Unique Index Fulltext
Comprehension decimal(10,0) No None Browse distinct values Change Drop Primary Unique Index Fulltext
Rate decimal(10,0) No None Browse distinct values Change Drop Primary Unique Index Fulltext
Spelling decimal(10,0) No None Browse distinct values Change Drop Primary Unique Index Fulltext
Recall Date date No None Browse distinct values Change Drop Primary Unique Index Fulltext
Status varchar(20) utf8_unicode_ci No None Browse distinct values Change Drop Primary Unique Index Fulltext
gstarke
 
Posts: 10
Joined: Tue May 11, 2010 2:38 am

Re: Fatal Error

Postby shannah » Wed May 12, 2010 9:09 pm

Can you post the create table statement? You can do this with an export without data
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Fatal Error

Postby gstarke » Thu May 13, 2010 3:11 am

Hi Steve

Is this the format you're suggesting - created as export from phpMyAdmin?

--
-- Table structure for table `Clients`
--

CREATE TABLE IF NOT EXISTS `Clients` (
`Initial Testing` date NOT NULL,
`Firstname` varchar(20) collate utf8_unicode_ci NOT NULL,
`Surname` varchar(20) collate utf8_unicode_ci NOT NULL,
`Address` varchar(50) collate utf8_unicode_ci NOT NULL,
`Suburb` varchar(20) collate utf8_unicode_ci NOT NULL,
`State` varchar(3) collate utf8_unicode_ci NOT NULL,
`Postcode` varchar(4) collate utf8_unicode_ci NOT NULL,
`Parent Names` varchar(20) collate utf8_unicode_ci NOT NULL,
`Telephone` varchar(10) collate utf8_unicode_ci NOT NULL,
`Mobile` varchar(10) collate utf8_unicode_ci NOT NULL,
`D.O.B.` date NOT NULL,
`Refered` varchar(20) collate utf8_unicode_ci NOT NULL,
`Optom` varchar(20) collate utf8_unicode_ci NOT NULL,
`Script` varchar(10) collate utf8_unicode_ci NOT NULL,
`Date of Lens Test` date NOT NULL,
`Initial Tint` varchar(30) collate utf8_unicode_ci NOT NULL,
`Retest Date` date NOT NULL,
`Change of Tint` varchar(30) collate utf8_unicode_ci NOT NULL,
`Problem` varchar(50) collate utf8_unicode_ci NOT NULL,
`Patterns` varchar(50) collate utf8_unicode_ci NOT NULL,
`Overlays` varchar(30) collate utf8_unicode_ci NOT NULL,
`Paper` varchar(20) collate utf8_unicode_ci NOT NULL,
`Reading` decimal(10,0) NOT NULL,
`Comprehension` decimal(10,0) NOT NULL,
`Rate` decimal(10,0) NOT NULL,
`Spelling` decimal(10,0) NOT NULL,
`Recall Date` date NOT NULL,
`Status` varchar(20) collate utf8_unicode_ci NOT NULL,
KEY `Firstname` (`Firstname`,`Surname`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
gstarke
 
Posts: 10
Joined: Tue May 11, 2010 2:38 am

Re: Fatal Error

Postby shannah » Thu May 13, 2010 7:02 am

Ok. Possible problems are with the d.o.b. Field. Xataface doesn't like periods in the column names. Generally I avoid spaces as well though they might be ok.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Fatal Error

Postby gstarke » Thu May 13, 2010 4:50 pm

Ah ha!! That did it.
I changed the name of the D.O.B. to DOB, tried again and got a different error this time - "table has no primary key", which I corrected, and behold it works!
I just knew it had to be something simple.
Thanks for that.
I will now begin to explore what Xataface can do.
gstarke
 
Posts: 10
Joined: Tue May 11, 2010 2:38 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 33 guests

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