Bug #67260 [NEW]: php v5.5.12-1~dotdeb.1 parse_ini_file problems
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)
- hakery at bk dot ru