Bug #67260 [NEW]: php v5.5.12-1~dotdeb.1 parse_ini_file problems

From: Date: Mon, 12 May 2014 16:32:42 +0000
Subject: Bug #67260 [NEW]: php v5.5.12-1~dotdeb.1 parse_ini_file problems
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185786@lists.php.net to get a copy of this message
From:             hakery at bk dot ru
Operating system: Debian 7 (x64)
PHP version:      5.5.12
Package:          PHP options/info functions
Bug Type:         Bug
Bug description:php v5.5.12-1~dotdeb.1 parse_ini_file problems

Description:
------------
problem occurs when parsing ini file. 
Apache Web server successfully handles parsing and outputs the result,
in my case it change language on the site. Language changes successfully
but at the same time, the script displays an error that I could not find
the file.on the server and сentos 5.5.11 was no such problem

Test script:
---------------
function lang(){
	if(!isset($_SESSION['country'])){  //Проверки
сессии.
Если сессия пустая получаем
код страны
по ИП пользователя
		
		
		
		$country = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
		$_SESSION['country']=$country;
		$langMod =$country.".ini";
		$landDir= $_SERVER['DOCUMENT_ROOT'].'/lang/'.$langMod;
		$_SESSION['DebugTemp']='Небыло сессии и
определили его по ип';
		
				if(file_exists($landDir))
					{
					$lang = parse_ini_file("$landDir");   //проверяем
есть
ли языковой пакет в папке,
если есть то
загружаем его
					}else{  // если пакета нету грузим
по
умолчанию англ
					$langMod ="us.ini";
					$landDir= $_SERVER['DOCUMENT_ROOT'].'/lang/'.$langMod;
					$lang = parse_ini_file("$landDir");
					}
		
		
	}else{
		$langSession =$_SESSION['country']; 
		$langMod = $langSession;
		$landDir= $_SERVER['DOCUMENT_ROOT'].'/lang/'.$langMod.'.ini';
		$lang = parse_ini_file("$landDir");
		$_SESSION['DebugTemp']='из сессии';
		
	}
	
	
}


Expected result:
----------------
change language

Actual result:
--------------
hange of language but also informs that the current language pack does
not have a

-- 
Edit bug report at https://bugs.php.net/bug.php?id=67260&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=67260&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=67260&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=67260&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=67260&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=67260&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=67260&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=67260&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=67260&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=67260&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=67260&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=67260&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=67260&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=67260&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67260&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=67260&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=67260&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=67260&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67260&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=67260&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=67260&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#185786) next »