Page 1 of 1

Problem with FacultyOfWidgetry sample app

PostPosted: Wed Oct 20, 2010 9:04 pm
by dha
Hi Steve,

I am a newbie so bear with me. I installed xataface-1.2.5 on wamp server 2.0i and everything seems fine:

Opening http://localhost/dataface/dataface_info.php shows:
===============
Dataface 1.2.5 1870
Installed at /dataface

Installation status INSTALLED CORRECTLY
Templates Dir C:\wamp\www\dataface/Dataface/templates
Templates Compile Dir C:\wamp\www\dataface/Dataface/templates_c
===============

However, when I open http://localhost/FacultyOfWidgetry/ I got this:

===============
display(); // display the application $time = microtime(true) - $time; echo "

Execution Time: $time
"; ?>
===============

The content of my c:\wamp\www\FacultyOfWidgetry\index.php is:

===============
<?
/**
* 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 'c:/wamp/www/dataface/dataface-public-api.php';
// include the initialization file
df_init(__FILE__, 'http://localhost/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>";
?>
===============

The content of my c:\wamp\www\FacultyOfWidgetry\index.php is:

===============
[_database]
host = "localhost"
user = "root"
password = ""
name = "FacultyOfWidgetry"

[_tables]
Course = "Course"
Program = "Program"
===============

Can you please tell me what I did wrong or did not do? Thank you very much.

Regards,
Don

Re: Problem with FacultyOfWidgetry sample app

PostPosted: Thu Oct 21, 2010 9:48 am
by shannah
The source for the faculty of widgetry sample apparently uses the old short open tags. You need to change all open tags from
Code: Select all
<?

to
Code: Select all
<?php


Alternatively you could just enable short_open_tags in your php.ini file.

-Steve

Re: Problem with FacultyOfWidgetry sample app

PostPosted: Thu Oct 21, 2010 10:01 am
by dha
Much appreciated. Thanks, Steve.