include_path in php.ini

Problems with the Windows version of XAMPP, questions, comments, and anything related.

include_path in php.ini

Postby free69 » 19. June 2004 11:16

Hi,
I run php-nuke and tried to put local language file but in vain due to below errors.
First of all, I set site language to my local language.
When I input lang-korean.php file to module/Submit_News/language folder, no errors but posting is not available.
When I remove local language file, however, below error messages come out and posting is okay. This is same to reviews and comments, which are all posting function.

Warning: main(language/lang-korean.php): failed to open stream: No such file or directory in D:\xampp\www\home\mainfile.php on line 163

Warning: main(): Failed opening 'language/lang-korean.php' for inclusion (include_path='.;D:\xampp\php\pear\') in D:\xampp\www\home\mainfile.php on line 163

And line 163/mainfile.php is;
Code: Select all
$mainfile = 1;
$result = $db->sql_query("SELECT sitename, nukeurl, site_logo, slogan, --- --- ---, language, locale, multilingual, -- -- --, Version_Num FROM ".$prefix."_config");
$row = $db->sql_fetchrow($result);
$sitename = $row['sitename'];
$nukeurl = $row['nukeurl'];
$site_logo = $row['site_logo'];
$slogan = $row['slogan'];
--- --- ---
---  ---  ---
$language = $row['language'];
$locale = $row['locale'];

if ($forum_admin != 1) {
    if (isset($newlang) AND !eregi("\.","$newlang")) {
   if (file_exists("language/lang-".$newlang.".php")) {
       setcookie("lang",$newlang,time()+31536000);
       include("language/lang-".$newlang.".php");
       $currentlang = $newlang;
   } else {
       setcookie("lang",$language,time()+31536000);
       include("language/lang-".$language.".php");
       $currentlang = $language;
   }
    } elseif (isset($lang)) {
   include("language/lang-".$lang.".php");<<=========== Line 163
   $currentlang = $lang;
    } else {
   setcookie("lang",$language,time()+31536000);
   include("language/lang-".$language.".php");
   $currentlang = $language;
    }

And php.ini setting is;
Code: Select all
; Windows: "\path1;\path2"
; include_path = ".;c:\"
include_path = ".;D:\xampp\php\pear\;"


Please let me know to register lang-$language.php file to php-nuke.
free69
 
Posts: 35
Joined: 02. June 2004 05:52

Postby Wiedmann » 19. June 2004 14:17

I think,
the file "lang-korean.php" must be in
D:\xampp\www\home\language\lang-korean.php

and not in the module/Submit_News/language folder.

Your current path is
D:\xampp\www\home\"

and with the function:
include("language/lang-".$lang.".php");

and the include_path:
".;D:\xampp\php\pear"

the file ist searched in:
"D:\xampp\www\home\language"
and
"D:\xampp\php\pear\language"
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby free69 » 20. June 2004 01:05

Thanks for opinion.
Language folders are located at root/language and root/modules/submit_news/language respectively.
My local language file is at language folders where lang-english.php, lang-german.php, lang-whatever.php are together.
In this regard, I don't understand what
include_path='.;D:\xampp\php\pear\ means.
free69
 
Posts: 35
Joined: 02. June 2004 05:52

Hi, I have your problem, too

Postby md4i » 25. July 2004 03:31

Hi, I have your problem, too


http://community.apachefriends.org/f/viewtopic.php?t=6652

Have you a information for me?

Thank you! :D
md4i
 
Posts: 3
Joined: 24. July 2004 23:45
Location: Velburg


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 140 guests