cannot install first application after sucessfully xataface

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

cannot install first application after sucessfully xataface

Postby si_fly » Wed Mar 31, 2010 8:55 am

[url][

Hi,

I have installed xataface on a windows vista SP2 desktop pc and installed xampp to run mysql 5.1.39-ndb-7.0.9-cluster-gpl, apache 2.2 and PHP 5.3. I have also tried this on my windows 7 server with both IIS and Xampp running apache and get the same result.

I have tried a couple of solutions to get to a newly installed application. 1st I used installer.php (see below for ATTEMPED SOLUTION 1 for error log) and then I tried to build an application by coding into PHP using the instructions from xataface (install instructions and error log in ATTEMPTED SOLUTION 2) .

Sorry, I am not a php expert, so I may be just being stupid. Can you tell me what I am doing wrong?

Regards,

Simon Barker
Simon.j.barker@gmail.com

Below is what I have done to set up xataface:

Installed Xampp which has a preconfigured MySQL server with all privileges given to user root with no password.

change php.ini file:

allow_url_include = off
log_errors = off

change to

allow_url_include = on
log_errors = on

restart apache server

download and open compressed file from xataface downloads with fix for php 5.3.0 depreciation warnings
http://sourceforge.net/projects/datafac ... p/download

rename the xataface-xx.xx.xx folder to dataface
create app folder ie c:\xampp\htdocs\test
move dataface folder (ie c:\xampp\htdocs\test\dataface)

Give c:\xampp and folders full control to everyone and add anonymous logon with full control

Ran http://localhost/test/dataface/dataface_info.php

And received:


Dataface 1.2.3b2 1700
Installed at /test/dataface

Installation status INSTALLED CORRECTLY
Templates Dir C:\xampp\htdocs\test\dataface/Dataface/templates
Templates Compile Dir C:\xampp\htdocs\test\dataface/Dataface/templates_c


ATTEMPED SOLUTION 1:

After loading the page which allows you to add a database, the Xataface application installer at:

http://localhost/test/dataface/installe ... ion=db2app

Gave the following result:

Warning: require_once(HTML/QuickForm.php) [function.require-once]: failed to open stream: No such file or directory inC:\xampp\htdocs\test\dataface\installer.php on line 246

Fatal error: require_once() [function.require]: Failed opening required 'HTML/QuickForm.php' (include_path='.:lib') inC:\xampp\htdocs\test\dataface\installer.php on line 246



I used windows search and found the following files:

C:\xampp\htdocs\test\dataface\lib\HTML\QuickForm.php
C:\xampp\htdocs\test\dataface\HTML\QuickForm.php


ATTEMPED SOLUTION 1:

create index.php file in c:\xampp\htdocs\test using php editor and add the following code:
<?php
echo dirname(__FILE__);
require_once '/dataface/dataface-public-api.php';
df_init(__FILE__, '/dataface/');
$app =& Dataface_Application::getInstance();
$app->display();
?> location and name of API
location of xataface directory
start instance of xataface
show xataface instance

create and save conf.ini in same location as index.
[_database]
host = "localhost"
user = "root"
password = ""
name = "contacts"

[_tables]
Contacts = "contact_name" location of MySQL server
username of MySQL server
password of MySQL server
name of dbs to include: add new line for extra


names of tables to include: add new line for extra


When run from http://localhost/test/, get the following errors:

C:\xampp\htdocs\test
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\test\index.php:3) inC:\xampp\htdocs\test\dataface\Dataface\Application.php on line 590

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\test\index.php:3) in C:\xampp\htdocs\test\dataface\Dataface\Application.php on line 795

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\test\index.php:3) in C:\xampp\htdocs\test\dataface\Dataface\Application.php on line 795

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\test\index.php:3) inC:\xampp\htdocs\test\dataface\Dataface\Application.php on line 796
Block "custom_stylesheets2"
Block "head"
Block "body_atts"
>
Block "before_body"
Block "before_header"

Block "after_header"
Block "before_search"
Search:
Block "after_search_form_submit"
Block "after_search"
Block "before_nav_menu"
Block "tables_menu_head"
• test
Block "tables_menu_tail"
Block "after_nav_menu"
Block "before_language_selector"
Block "after_language_selector"
Block "before_bread_crumbs"
You are here: test :: List
Block "after_bread_crumbs"
Block "before_main_table"
Block "before_left_column"
Block "before_record_tree"
Block "after_record_tree"
Block "before_application_menu"
Block "after_application_menu"
Block "after_left_column" Block "before_main_column"
Block "before_table_tabs"
Block "actions_menu_head"
• Details
• List
• Find
Block "actions_menu_tail"
Block "before_menus"
• New Record
• Show All
• Copy Set
• Delete Set
• Update Set
• Import Records
Block "after_menus"
Block "before_main_section"
Block "before_result_list"
Block "actions_menu_head"
• Export CSV
• Export XML
• RSS
Block "actions_menu_tail"
No records matched your request.
Block "after_result_list"
Block "after_main_section"
Block "before_fineprint"
Powered by Dataface
(c) 2005-2007 All rights reserved
Block "after_fineprint"
Block "before_global_footer"
Block "after_global_footer"




/url]
si_fly
 
Posts: 3
Joined: Wed Mar 31, 2010 2:58 am

Re: cannot install first application after sucessfully xataface

Postby shannah » Wed Mar 31, 2010 9:12 am

In Solution 1:
Here is the problematic line:
Code: Select all
require_once '/dataface/dataface-public-api.php';


This require must contain path to dataface-public-api.php. You appear to have specified a URL. If the dataface folder is inside the test folder then this line could be:
Code: Select all
require_once 'dataface/dataface-public-api.php';


(as a relative path).

*note the lack of a preceding slash

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: cannot install first application after sucessfully xataface

Postby si_fly » Mon Apr 05, 2010 8:01 am

Hi,

It looks like there is something else missing as it can't find the HTML/QuickForm.php file. I have run two senarios on xampp running on port 8070.

TEST 1

I am also running it using the installer, ie

http://localhost:8070/test/dataface/installer.php

and that runs the add application page, which runs the script:

http://localhost:8070/test/dataface/ins ... ion=db2app

Warning: require_once(HTML/QuickForm.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\test\dataface\installer.php on line 246

Fatal error: require_once() [function.require]: Failed opening required 'HTML/QuickForm.php' (include_path='.:lib') in C:\xampp\htdocs\test\dataface\installer.php on line 246

The files are at the following paths:
C:\xampp\htdocs\test\dataface\lib\HTML\QuickForm.php
C:\xampp\htdocs\test\dataface\HTML\QuickForm.php


TEST 2

I altered the preceding slash as requested in the last post so conf.ini is:

<?php
require_once 'dataface/dataface-public-api.php';
df_init(__FILE__, 'dataface/');
$app =& Dataface_Application::getInstance();
$app->display();
?>

The hardcoded test application above generated the following code (+ the dataface logo and the tabs for the tables:

Block "custom_stylesheets2"
Block "head"
Block "body_atts"
>
Block "before_body"
Block "before_header"

Block "after_header"
Block "before_search"
Search:
Block "after_search_form_submit"
Block "after_search"
Block "before_nav_menu"
Block "tables_menu_head"
test
Block "tables_menu_tail"
Block "after_nav_menu"
Block "before_language_selector"
Block "after_language_selector"
Block "before_bread_crumbs"
You are here: test :: List
Block "after_bread_crumbs"
Block "before_main_table"
Block "before_left_column"
Block "before_record_tree"
Block "after_record_tree"
Block "before_application_menu"
Block "after_application_menu"
Block "after_left_column"
Block "before_main_column"
Block "before_table_tabs"
Block "actions_menu_head"
details list find
Block "actions_menu_tail"
Block "before_menus"
new record show all copy set delete set update set import records
Block "after_menus"
Block "before_main_section"
Block "before_result_list"
Block "actions_menu_head"

Block "actions_menu_tail"
No records matched your request.

Block "after_result_list"
Block "after_main_section"
Block "before_fineprint"
Powered by Dataface
(c) 2005-2007 All rights reserved
Block "after_fineprint"
Block "before_global_footer"
Block "after_global_footer"

The file is being built in C:\xampp\htdocs\test\dataface\Dataface\templates_c\dataface

but doesn't seem to display correctly
si_fly
 
Posts: 3
Joined: Wed Mar 31, 2010 2:58 am

Re: cannot install first application after sucessfully xataface

Postby shannah » Thu Apr 08, 2010 9:57 am

Please just post your index.php file as it stands now, and describe error you are receiving briefly. That information should be enough to diagnose the problem.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: cannot install first application after sucessfully xataface

Postby orillia319 » Thu Jul 15, 2010 6:03 am

My problem is similar and seems to relate to QuickForm.php.

dataface_info.php provides correct information (Installation status, templates directories, license). The software version is Dataface 1.2.4 1811. It seemed to me that 1.2.4 was the last stable release, so I d/l'd it instead of 1.2.5.

The "Create application for existing database" option at http://[my local server]/xataface/installer.php, however, yields the following:

Warning: require_once(HTML/QuickForm.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampplite\htdocs\xataface-1.2.4\installer.php on line 246

Fatal error: require_once() [function.require]: Failed opening required 'HTML/QuickForm.php' (include_path='.:lib') in C:\xampplite\htdocs\xataface-1.2.4\installer.php on line 246


The relevant code in installer.php is require_once 'HTML/QuickForm.php';.

I downloaded the QuickForm PEAR library as it did not seem to be present in my xampplite installation. I downloaded the deprecated version, HTML_QuickForm-3.2.11, and installed it using the pear command. I figured I'd at least get a step or two further along and determine from any errors whether I might need a newer version. I made no other assumptions about which version of QuickForm to install.

Note: I'm running xampplite 1.7.3 under Windows 7 Ultimate, 64-bit.

My questions: Which version of QuickForm should I have installed? Where is the QuickForm.php file that looks as though it belongs in the HTML folder under xataface?

I downloaded an earlier version of Xataface and got the same results.

Thanks in advance.
orillia319
 
Posts: 3
Joined: Wed Jul 14, 2010 10:24 am

Re: cannot install first application after sucessfully xataface

Postby shannah » Thu Jul 15, 2010 8:30 am

Quickform is included with the Xataface install. If it can't find it then there was a problem with the install. Please confirm that the file Dataface/lib/HTML/QuickForm.php exists and is readable by the web server.

Another note is that the include path doesn't look correct. Your server may have restrictions on the use of set_include_path() which prevented xataface from adding xataface to the include path.

Don't try to install quickform as your problem is more foundational than that. If you simply add quickform to the path, you will surely hit another error when the next necessary file can't be found.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: cannot install first application after sucessfully xataface

Postby orillia319 » Thu Jul 15, 2010 8:59 am

Thanks for the quick response. The file you mentioned does indeed exist:

Code: Select all
http://localhost:85/xataface-1.2.4/lib/HTML/QuickForm.php
(file://c:/xampplite/htdocs/xataface-1.2.4/lib/HTML/QuickForm.php)


Yes, it definitely looks as though I need to look at how set_include_path() is handled.

Thanks again!
orillia319
 
Posts: 3
Joined: Wed Jul 14, 2010 10:24 am

Re: cannot install first application after sucessfully xataface

Postby orillia319 » Thu Jul 15, 2010 10:18 am

I solved the problem in my Windows 7 XAMPP environment after some investigation by changing this line in installer.php:

"ini_set('include_path','.:lib');" to this: "ini_set('include_path','c:\xampplite\htdocs\xataface-1.2.4\lib');"

Everything seems to be working now (I was able to generate an application, and the resulting app seems to work).

Cheers.

P.S. I should have installed this on my Mac or on my Linux-based hosting service, but at least I know now how to deal with this in the Windows environment. I'll eventually wrap an "if" statement around the changed code to check the environment and use the appropriate parameters in the ini_set.
orillia319
 
Posts: 3
Joined: Wed Jul 14, 2010 10:24 am

Re: cannot install first application after sucessfully xataface

Postby shannah » Thu Jul 15, 2010 11:56 am

Thanks for posting this. I'll see about modifying this to work in the general case for the next release.
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 41 guests

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