Page 1 of 1
Parse error
Posted:
Sun Mar 28, 2010 4:26 pm
by gahedev
Getting this error when I attempt to load index.php:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home4/livadmin/lightinthevalley-www/dataface/dataface-public-api.php on line 472
I'm using PHP 4.4.4.
Here's my code:
- Code: Select all
<?php
/**
* File: index.php
* Description:
* -------------
*
* This is an entry file for this Dataface Application. To use your application
* simply point your web browser to this file.
*/
$time = microtime(true);
// use the timer to time how long it takes to generate a page
require_once '/home4/livadmin/lightinthevalley-www/dataface/dataface-public-api.php';
// include the initialization file
df_init(__FILE__, 'http://lightinthevalley.org/dataface');
// initialize the site
$app =& Dataface_Application::getInstance();
// get an application instance and perform initialization
$app->display();
// display the application
$time = microtime(true) - $time;
echo "<p>Execution Time: $time</p>";
?>
Your thoughts?
Re: Parse error
Posted:
Sun Mar 28, 2010 5:46 pm
by jhenry
I have seen where there are certain issues with PHP V4 are you able to upgrade to PHP5? Just keep in mind that there are issues with 5.3.0 so you want a version above or below that. Have you added any ini or configuration files to your application? Keep in mind also you should be pointing to the name of your database so it should be
http://localhost/name_of_database.
Jason
Re: Parse error
Posted:
Sun Mar 28, 2010 6:17 pm
by gahedev
I am on a hosted server so do not have the authority to upgrade the PHP version.
I used makesite to create the site for an existing MySQL database. It therefore has an INI file. Here it is:
- Code: Select all
; File: conf.ini
; Description:
; ------------
; This file contains configuration information for the dataface framework.
; Configuration options include such things as database connection information
; tables to be displayed in the menu, and behavioral and display characteristics
; of the dataface application (like whether to display the menu).
;
[_database]
host = "lightinthevalley.org"
user = "xxx"
password = "xxx"
name = "lightinthevalley_org"
[_tables]
audio = "audio"
I'm not quite clear what you're referring to in your last sentence. Where am I pointing to the database in the URL?
Re: Parse error
Posted:
Sun Mar 28, 2010 7:10 pm
by jhenry
You should be using the following url:
http://lightinthevalley.org/lightinthevalley_orgTo reach the xataface application.
Jason
Re: Parse error
Posted:
Sun Mar 28, 2010 7:17 pm
by gahedev
I get a 403 error at that URL: You don't have permission to access /lightinthevalley_org/ on this server.
Re: Parse error
Posted:
Sun Mar 28, 2010 7:34 pm
by jhenry
If you ftp into the server you should have the following directories in the document root:
/lightinthevally_org
/xataface
This is assuming it was not installed in another directory other than the root directory of the server. If so it will be in that folder.
Check the permissions on the directories as it should be the www user. What version of xataface are you using? There should be a version.txt file in the xataface directory that shows what version you have. I am assuming the install finished with an "Installation successful" message?
Jason
Re: Parse error
Posted:
Sun Mar 28, 2010 7:46 pm
by gahedev
I had renamed the xataface folder to dataface, since that seemed to be used in the documentation. I changed the permissions on that folder to 777.
Version is 1.2.2 1616.
Re: Parse error
Posted:
Sun Mar 28, 2010 7:57 pm
by gahedev
I checked and do not have a folder named /lightinthevalley_org in root. I have one named /livadm -that is the name I gave to the application. It has permissions set to 755. That is where I was pointing when I got the initial parse error message.
Re: Parse error
Posted:
Sun Mar 28, 2010 8:12 pm
by jhenry
I see it now it looks like that is a php issue. I am thinking it is due to the PHP4 but I will do some searching and see if I can find a post on that.
I found this:
As far as I'm aware latest version is only compatible with PHP5. Perhaps until someone can suggest a workaround, try an older version of xataface from:
http://sourceforge.net/projects/dataface/files/All you should have to do is replace the dataface folder with the older version and see if it works. Just make a back-up of the existing folder first.
Jason
Re: Parse error
Posted:
Sun Mar 28, 2010 8:15 pm
by jhenry
Re: Parse error
Posted:
Sun Mar 28, 2010 8:34 pm
by gahedev
When you say 'replace the dataface folder' I assume you mean the subfolder of xataface contaning the ConfigTool and FormTool folders? Or do you mean the main folder originally named xataface? Thanks, by the way, for all your assistance with this...
Re: Parse error
Posted:
Sun Mar 28, 2010 9:22 pm
by jhenry
The whole folder that you renamed to dataface. It includes all the files for the application.
And its no problem the creater of the app usually answers my posts so I try to help out when I can.
Jason
Re: Parse error
Posted:
Mon Mar 29, 2010 5:52 pm
by gahedev
Just to close this out: I did as you suggested. I downloaded and installed a previous version, and that did the trick. Looks like I'm good to go. Thanks again for your help.
Re: Parse error
Posted:
Mon Mar 29, 2010 8:37 pm
by jhenry
No problem I am glad I could help.
Jason