Created
August 13, 2015 09:46
-
-
Save KristianH/50b207947c8c08dec465 to your computer and use it in GitHub Desktop.
oxid ini_set systemrequirements test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* this snippet checks if ini_set settings can be set | |
* @link http://wiki.oxidforge.org/Installation#ini_set_allowed | |
*/ | |
$oxidRequirements = array( | |
"session.name" => 'test', | |
"session.use_cookies" => "0", | |
"session.use_trans_sid" => "0", | |
"url_rewriter.tags" => 'test', | |
"session.gc_maxlifetime" => "36123", | |
"default_socket_timeout" => "123", | |
"display_errors" => 'on', | |
"sendmail_from" => 'test', | |
"include_path" => 'test', | |
); | |
foreach ($oxidRequirements as $setting => $value) { | |
ini_set($setting, $value); | |
if(ini_get($setting) === $value) { | |
continue; | |
} | |
echo $setting . ' was not set: actual: ' . var_export(ini_get($setting), true). ' shall: ' . var_export($value , true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment