Skip to content

Instantly share code, notes, and snippets.

@KristianH
Created August 13, 2015 09:46
Show Gist options
  • Save KristianH/50b207947c8c08dec465 to your computer and use it in GitHub Desktop.
Save KristianH/50b207947c8c08dec465 to your computer and use it in GitHub Desktop.
oxid ini_set systemrequirements test
<?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