problem with import I18Nv2

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

problem with import I18Nv2

Postby fantomasdm » Sat Apr 12, 2008 12:36 pm

HI! I get this error on open application!
Warning: import(I18Nv2/I18Nv2.php) [function.import]: failed to open stream:
my index.php is:
require_once "/membri/giorgiosaporito/xataface/dataface-public-api.php";
df_init(__FILE__, "http://www.giorgiosaporito.altervista.org/xataface");
$app =& Dataface_Application::getInstance();
$app->display();

if I add this line on config.inc.pho on line 236
if ($file=="I18Nv2/I18Nv2.php" || $file=="I18Nv2/Negotiator.php")
require_once "/membri/giorgiosaporito/xataface/lib/".$file;
else

it's working, but I get some other error!!
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby shannah » Sat Apr 12, 2008 11:26 pm

I would look to permissions on your xataface files to make sure that they are readable by the web server.

When you make the mod you describe, what are the other errors that you receive?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby fantomasdm » Mon Apr 14, 2008 10:48 am

Hi I have make this change:
on file config.inc.php in line 234
if ( !isset($imports[$file]) ){
$imports[$file] = true;
//echo "cerco:".substr($file,0,strpos($file,"/"));
if (substr($file,0,strpos($file,"/")) == "I18Nv2")
{
//echo "Carico gio: lib/".$file;
require_once "lib/".$file;
}
else
{
//echo "Carico td: ".$file;
require_once $file;
}
}
on file I18Nv2.php in line 193:
require_once '/membri/giorgiosaporito/xataface/lib/I18Nv2/Negotiator.php';
on file Negotiator.php in line 368:
include_once '/membri/giorgiosaporito/xataface/lib/I18Nv2/Country.php';
on file Country.php in line 23:
require_once '/membri/giorgiosaporito/xataface/lib/I18Nv2/CommonList.php';

But now I get this error:
Fatal error: Undefined class name 'dataface_error' in /membri/giorgiosaporito/xataface/Dataface/Application.php on line 620
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby fantomasdm » Mon Apr 14, 2008 11:13 am

I have comment on line 20 Dataface_Error::printStackTrace() and in file
index.php I have set
session_save_path('/membri/giorgiosaporito/tmp');
but now I get new error:

Warning: main(PEAR.php) [function.main]: failed to open stream: No such file or directory in /membri/giorgiosaporito/xataface/Dataface/Error.php on line 21

Fatal error: main() [function.require]: Failed opening required 'PEAR.php' (include_path='.:') in /membri/giorgiosaporito/xataface/Dataface/Error.php on line 21

I think that I don't have Pear library on server!! Is possible?
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby fantomasdm » Mon Apr 14, 2008 11:43 am

HI...sorry PEAR.php is in xataface dir...and now in file Error.php in line 21
require_once '/membri/giorgiosaporito/xataface/PEAR.php';


and now the error is:
Warning: import() [function.import]: Unable to access /membri/giorgiosaporito/xataface/SQL/Parser.php in /membri/giorgiosaporito/xataface/config.inc.php on line 244

...but in packege beta-2.zip I don't have this File!!!!!!
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby shannah » Tue Apr 15, 2008 12:32 pm

It doesn't look like your server is allowing the call to set the include path.

Create a php file with the following:
Code: Select all
<?php
phpinfo();


Then load the page in your browser and go to the part that says "disable_functions". What does it say?

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

Postby fantomasdm » Wed Apr 16, 2008 9:35 am

HI! I have write a test.php:
echo "risultato con php4:".set_include_path(".:../xataface");
echo "vediamo se conferma:".set_include_path(".:../xataface");
phpinfo();

and result is at link:
http://www.giorgiosaporito.altervista.org/test.php

It's seem to me that set_include_path working!
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby shannah » Wed Apr 16, 2008 2:00 pm

how about the ini_set() function.

Code: Select all
echo "Include path before: ".ini_get('include_path');

ini_set('include_path', '.:..');
echo "Include path after: ".ini_get('include_path');
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby fantomasdm » Thu Apr 17, 2008 8:22 am

HI test.php now is:
echo "risultato con php4:".set_include_path(".:../xataface")."<br>";
echo "vediamo se conferma:".set_include_path(".:../xataface")."<br>";

echo "Include path before: ".ini_get('include_path')."<br>";
ini_set('include_path', '.:..');
echo "Include path after: ".ini_get('include_path')."<br>";
phpinfo();


and result is:
risultato con php4:.:
vediamo se conferma:.:../xataface
Include path before: .:../xataface
Include path after: .:../xataface


link is : http://www.giorgiosaporito.altervista.org/test.php
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby shannah » Thu Apr 17, 2008 8:40 am

OK.. so that is the problem.... your server has disabled access to the ini_set() function.

THis is used in a number of places in Xataface, however you may be able to work around this, however by making a change in the xataface config.inc.php file.

Find the line where it says :
Code: Select all
ini_set('include_path', $include_path );


Change it to:
Code: Select all
set_include_path($include_path);
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby fantomasdm » Thu Apr 17, 2008 8:57 am

Good Now it's work!!
Thank For help!!!

..but I have an other problem... with same application, that run on other server.
with dataface 0.7.1 all it's working but with beta2, after login I can't see nothing!!
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby fantomasdm » Thu Apr 17, 2008 9:02 am

It's seem to me that after login I can't see error message.
fantomasdm
 
Posts: 114
Joined: Thu Mar 13, 2008 2:35 pm

Postby shannah » Thu Apr 17, 2008 9:15 am

Try adding the following to the beginning of your index.php file:
Code: Select all
error_reporting(E_ALL);


to see if that starts displaying errors.

Best if you have access to the apache error log so you can see what the error is.
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 18 guests

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