Pathing problem due to my mistakes....

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

Pathing problem due to my mistakes....

Postby mike.jones » Tue Feb 12, 2013 11:49 am

Hi,

Trying to get Xataface going to assist in a data entry for an upcoming event.

We are installing the application folder (contest) in a subfolder of the domain due to some setup issues from wayback when.

We have the .htaccess file redirecting to the sub-folder for all writes where we have Joomla! installed and running.

swmobridgecontest.org is the URL

We are able to Xataface working, but the paths to the style sheet and the graphics don't seem to be correct.

Here is the index.php file

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 '/home/swmobridge/swmobridgecontest.org/cms/contest/dataface/dataface-public-api.php';
  // include the initialization file
df_init(__FILE__, '/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>";
?>


Here is where the path for the images seems to be pointing...

<img src="/dataface/images/logo-small.jpg


The makesite script was utilized to deploy the folders and such.

Do I simply modifiy the index.php to have the df_init(___FILE___, '/dataface'); spell out the direct path?

Anyway, my relative pathing kung-fu is weak and pitiful, so any assistance would be appreciated.

Regards,

Mike
mike.jones
 
Posts: 12
Joined: Mon Feb 11, 2013 9:17 pm

Re: Pathing problem due to my mistakes....

Postby auphi » Tue Feb 12, 2013 1:00 pm

I have the same setup. Get rid of the / in "df_init(___FILE___, '/dataface');"

You can also use the relative path for require_once.

Here's my index.php
Code: Select all
require_once "xataface/dataface-public-api.php";
df_init(__FILE__, "xataface");
$app =& Dataface_Application::getInstance();
$app->display();

Note: my sub-folder is named "xataface", it looks like yours is "dataface" so make sure to change your index file accordingly.
auphi
 
Posts: 20
Joined: Sun Oct 21, 2012 7:39 pm

Re: Pathing problem due to my mistakes....

Postby mike.jones » Tue Feb 12, 2013 3:33 pm

Wonderful - appreciate the assistance.

Works great!
mike.jones
 
Posts: 12
Joined: Mon Feb 11, 2013 9:17 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 1 guest

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