View Issue Details

IDProjectCategoryView StatusLast Update
0006978OXID eShop (all versions)4.07. Source code, Testpublic2024-06-12 10:38
ReporterBeckerEnterprises Assigned To 
PrioritylowSeveritytweakReproducibilityunable to reproduce
Status resolvedResolutionfixed 
Product Version6.1.3 
Fixed in Version6.2.0-rc.1 
Summary0006978: system requirements test of ini_set is not the correct way to do it and therefore might be result in a wrong result
DescriptionSetting the session name with ini_set will return false when the session is already established.
Also it is not the correct way to check if setting ini values is allowed or not, you can get access info on specified ini values with ini_get_all.

Here is an example of \OxidEsales\EshopCommunity\Core\SystemRequirements::checkIniSet which will check if changing session.name is allowed (replaced plain integer values with constants):

public function checkIniSet()
{
    $session_config = ini_get_all('session');

    if($session_config['session.name']['access'] & INI_USER)
        return static::MODULE_STATUS_OK;
    else
        return static::MODULE_STATUS_BLOCKS_SETUP;
}
Steps To ReproduceMaybe older PHP Versions might return a positive false result depending on their latest patch date.
Reproducible on Debian 8.11 with Plesk 17.8.11 and PHP 7.1 (7.1.27-debian.8.190311.0956).
TagsSystemRequirements ini_set
ThemeNot defined
BrowserNot defined
PHP Version7.1
Database VersionNot defined

Activities

QA

2019-05-06 11:14

administrator   ~0012882

Last edited: 2019-05-06 11:15

Hello and thanks for your report. Unfortunately I'm unable to reproduce the issue you mention. Even if the session is established before, setting the session name with ini_set returns true. Since this is the case, I set the priority to low, but acknowledged your report, because your provided solution is truly a good - maybe a better - alternative way to test the ini_set will work properly.

[sp]

SvenBrunk

2024-06-12 10:38

administrator   ~0017009

Changed to a different method with https://github.com/OXID-eSales/oxideshop_ce/commit/73c6f2698128961a36fe736bcbebf33a84aa4ec3 in v6.2.0-beta1