problem with import I18Nv2

Archived from the Xataface Users forum.

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!!


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?


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 — 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 — 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!!!!!!


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


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!


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’);`


fantomasdm — Thu Apr 17, 2008 8:22 am

HI test.php now is:

echo “risultato con php4:”.set_include_path(“.:../xataface”).”
”;

echo “vediamo se conferma:”.set_include_path(“.:../xataface”).”
”;

echo “Include path before: “.ini_get(‘include_path’).”
”;

ini_set(‘include_path’, ‘.:..’);

echo “Include path after: “.ini_get(‘include_path’).”
”;

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


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);

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 — Thu Apr 17, 2008 9:02 am

It’s seem to me that after login I can’t see error message.


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.


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 — Thu Apr 17, 2008 9:02 am

It’s seem to me that after login I can’t see error message.


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.