A place for users and developers of the Xataface to discuss and receive support.
by mightymorse » Sun Aug 02, 2009 3:27 pm
Just read the feature in php|architect and excited to try this out.... But I've met a stumbling block with getting fields.ini to work, both in the php|architect example and now also with the demo app in the FacultyOfWidgetry tutorial. The app itself works, however nothing in fields.ini has any effect -- e.g. the label remains the default db field name, despite widget:label being set. The error I see (when I turn them on):
Warning: syntax error, unexpected ':' in /Library/WebServer/Documents/FacultyOfWidgetry/tables/Program/fields.ini on line 2 in /Library/Webserver/Documents/xataface/Dataface/ConfigTool.php on line 331
The fields.ini in question was downloaded from the FacultyOfWidgetry tutorial:
- Code: Select all
[ProgramName] widget:label = "Program Name" widget:description = "Enter the name of the program" widget:atts:size = 50 widget:atts:style = "font-size: 24pt; font-family: Apple Chancery"
[HTMLOutline] widget:type = htmlarea
Just realized that I'm using PHP 5.3, if that is an issue.
Thanks for any suggestions,
Jason
-
mightymorse
-
- Posts: 4
- Joined: Sun Aug 02, 2009 3:09 pm
by shannah » Sun Aug 02, 2009 9:21 pm
The most likely explanation is that it isn't picking up the fields.ini file at all. Check the path to your fields.ini file. Path is case sensitive. I.e. if your table name is 'Foo', then our fields.ini file is locate in tables/Foo/fields.ini (not tables/foo/fields.ini).
Also make sure that your fields.ini file is readable by the webserver.
-Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by mightymorse » Mon Aug 03, 2009 5:39 am
I've double- and triple-checked the paths, case, and permissions. No dice. Everything was downloaded directly from the tutorial, just plopped into my doc root (and sql file executed to create db).
Below are the resulting paths.
- Code: Select all
/Library/WebServer/Documents/FacultyOfWidgetry/
FacultyOfWidgetry: .htaccess conf.ini index.php install: tables.sql README.txt tables: Course: Program: fields.ini
The error msg does seem to indicate that the fields.ini file has been found and read, but that it doesn't like the contents. I will try taking this to work today and testing it under some different conditions.
-Jason
-
mightymorse
-
- Posts: 4
- Joined: Sun Aug 02, 2009 3:09 pm
by shannah » Mon Aug 03, 2009 9:07 am
it could be the line endings. try converting to unix line endings
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by mightymorse » Mon Aug 03, 2009 9:17 am
After testing at work, it really looks like the PHP installation is the culprit. I set the tutorial code up on a 10.5 system freshly installed with PHP 5.2.9, and it worked as expected (fields.ini settings applied). Then I upgraded it to PHP 5.3 and the problem occurred (fields.ini settings ignored).
FWIW, I'm using the PHP distributions from www.entropy.ch (Marc Liyanage).
I will just proceed using 5.2 for now. So long as I can downgrade my home machine it shouldn't be an issue.
Thanks for your time,
Jason
Edit to add: Played around with it a little more, and it seems the PHP 5.3 setup doesn't like colons in the ini file keys. That's where parse_ini_file() craps out. There were definitely changes to ini file handling in PHP 5.3, according to the upgrade docs.
-
mightymorse
-
- Posts: 4
- Joined: Sun Aug 02, 2009 3:09 pm
by shannah » Wed Aug 05, 2009 12:36 pm
Hi Jason,
Thanks for reporting this. This is serious. I don't have access to any PHP 5.3 installs right now, but can you do me a favor and post this as a bug in the PHP bug tracker?
Here is a simple test case to try - and to include in the bug report:
File conf.ini
- Code: Select all
a:b=c
File test.php: - Code: Select all
<?php $res = parse_ini_file('conf.ini', true); echo $res['a:b'];
Expected results: - Code: Select all
c
Actual results: - Code: Select all
(place your actual results here).
And can you post the URL to the bug report in this thread?
Thanks so much.
Best regards
Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Wed Aug 05, 2009 2:01 pm
Thanks, Jason. I'm monitoring the issue. Hopefully the PHP people can either fix this - or suggest a workaround.
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Sun Aug 09, 2009 8:01 am
Looks like they have it fixed:
[5 Aug 9:45pm UTC] jani@php.netAlready fixed in SVN. Pretty much anything is allowed now.
So I would expect this issue would be fixed for version 5.3.1
Thanks for this Jason.
-Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by JonP » Sun Oct 31, 2010 8:09 am
I have just installed Xataface on Zend Server running PHP 5.3.2 and I am getting these deprecated messages and others all over the place. I cannot seem to find a setting for error level etc. that will turn the danged things off.
I have run the code posted earlier in this thread and I get the correct answer (C) so it is not the same problem causing this.
My default error reporting is set to E_ALL but I have tried changing that in index.php to no effect. My server is also set as display_errors = 0 but still they display. I even added ini_set('display_errors', 0); to index.php but again with no effect.
I am obviously missing something obvious - but I'm darned if I can see what. Any suggestions?
-
JonP
-
- Posts: 14
- Joined: Thu Jul 30, 2009 6:56 am
- Location: Mississauga
by shannah » Mon Nov 01, 2010 9:08 am
What version of Xataface are you running?
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by JonP » Mon Nov 01, 2010 11:18 am
V1.2.2 I was going to try 1.2.6 but I'm having FTP problems.
It does appear from experimental error that somewhere in the Xataface code it actually changes the error level. If I change it to the correct value in index.php and then display the current value at the end of that script the two do not match. I had too many other fires burning to go search for it.
-
JonP
-
- Posts: 14
- Joined: Thu Jul 30, 2009 6:56 am
- Location: Mississauga
by shannah » Mon Nov 01, 2010 11:51 am
I believe that all of these 5.3 issues should be fixed in the latest version.
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by JonP » Mon Nov 01, 2010 3:06 pm
Just got the update done and it does indeed cure the problem - thanks.
-
JonP
-
- Posts: 14
- Joined: Thu Jul 30, 2009 6:56 am
- Location: Mississauga
Return to Xataface Users
Who is online
Users browsing this forum: No registered users and 25 guests
|