relationships.ini (error : scalar value instead of array)

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

relationships.ini (error : scalar value instead of array)

Postby olivier_rosec » Wed May 06, 2009 8:59 am

Hello,

when setting up a many to many relationship between two tables through a relationships.ini file I get the same error all the time whichever syntax I use among the three possible ways of doing it described in Xataface's documentation.

[i](this message refers to the example app I set up so as to understand better what was going on : same error)[/i]

[code][pear_error: message="Parse error: Unknown action :s on line 1 select * from Course, ProgramCourses where Course.CourseID=ProgramCourses.CourseID and ProgramCourses.ProgramID='$ProgramID' ^ found: "s"" code=0 mode=return level=notice prefix="" info=""]
Warning: Invalid argument supplied for foreach() in /space/www/gl-ouv/1/6/1612031805215032/web/ouvaton.org/shakennotstirred.ouvaton.org/html/alpha/xataface/Dataface/Relationship.php on line 351

Warning: Cannot use a scalar value as an array in /space/www/gl-ouv/1/6/1612031805215032/web/ouvaton.org/shakennotstirred.ouvaton.org/html/alpha/xataface/Dataface/Relationship.php on line 558

Etc.[/code]

I scanned the whole forum for similar issues. Apparently it might be a problem either with the encoding of the files themselves when I FTP them to the shared host I am using, or it might be something like the PHP and MySQL settings on the host ?

I tried several flavours of quotes and even backticks around '$ProgramID' as it seems to me that the relationship PHP script isn't decoding this variable properly.

Thank you for any help

OR
olivier_rosec
 
Posts: 2
Joined: Wed May 06, 2009 6:59 am

Postby shannah » Wed May 06, 2009 9:47 am

Can you post the relevant relationships.ini file?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby olivier_rosec » Wed May 06, 2009 11:35 pm

Hello Steve,

in the end I decided to save the .ini file under Ultraedit with Unix linebreaks and a UTF-8 encoding and this is what I get from my host


[code]Fatal error: Call to undefined method: pear_error->getordercolumn() in /space/www/gl-ouv/1/6/1612031805215032/web/ouvaton.org/shakennotstirred.ouvaton.org/html/alpha/xataface/Dataface/Record.php on line 779[/code]

Here is the relevant relationships.ini file

[Courses]
Course.CourseID = ProgramCourses.CourseID
ProgramCourses.ProgramID = "$ProgramID"

OR
olivier_rosec
 
Posts: 2
Joined: Wed May 06, 2009 6:59 am

Postby shannah » Thu May 07, 2009 9:58 am

OK... this is still very strange. Since your getting different results with different character encodings I suspect that it could be the result of hidden characters still being placed in your relationships.ini file by your text editor.

I don't use Windows generally but I do know that Crimson Editor is a good free text editor that doesn't tend to muck with the files (and seems to work well).

Everything else looks fine in the relationships.ini file that you posted.

If you want you can attach the relationships.ini file to me in an email and I can inspect it closer for encoding etc..

steve@weblite.ca
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 23 guests

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