Problem with Relationship.ini

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

Problem with Relationship.ini

Postby spacelab » Mon May 12, 2008 12:33 pm

Hi,

I have been using xataface for sometime for a university research project and I have come up against a problem which I can't solve! I've looked through the forum for something similar but I can't seem to find anything.


The problem is basically that I have a local installation of dataface which works fine with the following relationship.ini

[Category]
tblFileCardCategories.FileCardID = "$FileCardID"

When I use this same code on the live site I get this error when opening the detail view of the table in question.

| // +----------------------------------------------------------------------+ // // require_once 'SQL/Compiler.php'; /** * An SQL Compiler to generate MySQL compliant SQL. */ class SQL_Compiler_mysql extends SQL_Compiler { function SQL_Compiler_mysql( $array = null ){ $this->SQL_Compiler($array); $this->type = 'mysql'; } /** * Wraps identifier in back-ticks. */ function compileIdent($value){ if ( strpos($value, '.') !== false ){ return implode('.',array_map(array(&$this, 'compileIdent'), explode('.', $value))); } switch ($value) { case '*' : return $value; default: return '`'.$value.'`'; } } }?>
Fatal error: Call to undefined method PEAR_Error::compile() in /Volumes/www/cddc/host/sigcis/atm/dataface/Dataface/Relationship.php on line 549

Is this something to do with the installation of MySQL on the host server? I can't seem to see what the issue is! BTW I might have made some hideous mistake as I am fairly new to all this.

Thanks for any help you can offer,

Robert
spacelab
 
Posts: 10
Joined: Mon May 12, 2008 12:27 pm

Postby shannah » Tue May 13, 2008 2:03 pm

Hi Robert,

Do you get that whole thing (including the bits of PHP code) as part of the error message, or only the Fatal error: part?

If you are getting the whole thing, then it looks like there may be a problem with some of the source that was uploaded as part of the Xataface install, as it isn't parsing the file lib/SQL/Compiler/mysql.php as a PHP file properly.

What version of Xataface are you using?

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

Postby spacelab » Tue May 13, 2008 4:50 pm

Thanks for the reply.

That was the whole message that I got (as in that was all that was on the browser window). The version of Xataface is 0.7.1 according to the version.txt file on the install. It essentially outputs that when I try to open the detail view of a record with a related table. I don't think that is my syntax as this seems to work on another server which is now using the 1.0 beta 2 version of Xataface.

BTW, I was think of using this other server (although it is not ideal) but I have run up against another issue. Is it possible to use valuelists on related tables? The table that is created contains codes for various categories of records which tell you little without the related table.

Thanks again for any help you can offer on either of these issues.

Robert

PS If it would help to have access to the server I can arrange that (via email!)
spacelab
 
Posts: 10
Joined: Mon May 12, 2008 12:27 pm

Postby shannah » Tue May 13, 2008 5:31 pm

OK.. The problem is that your server has short_open_tag off in the php.ini . I have fixed this in 1.0, but 0.7.1 still uses some short open tags:

See
http://ca3.php.net/manual/en/ini.core.php

for info about short open tags.

Basically a lot of dataface files use the shorter <? notation to start php, whereas the newer releases of PHP by default require the full tag:
<?php

So you will need to enable short_open_tag.

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

Postby spacelab » Mon May 26, 2008 3:49 am

Thought that might be an issue as recall changing all the tags before. I have however just updated instead and moved the database to a different host for other reasons as well so all sorted now.

Thanks for the help,

Robert
spacelab
 
Posts: 10
Joined: Mon May 12, 2008 12:27 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 32 guests

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