'4096' //INI_ALL , 'memory_limit' => '1024M' //INI_ALL , 'error_reporting' => '6143' //INI_ALL , 'default_charset' => 'UTF-8' //INI_ALL , 'session.use_cookies' => '1' //INI_ALL , 'session.use_only_cookies' => '1' //INI_ALL , 'session.auto_start' => '0' //INI_ALL , 'session.hash_function' => '1' //INI_ALL , 'session.hash_bits_per_character' => '6' //INI_ALL , 'allow_url_fopen' => 'on' //INI_ALL , 'display_errors' => 'off' //INI_ALL , 'display_startup_errors' => 'off' //INI_ALL , 'log_errors' => 'off' //INI_ALL ); protected static $PHP_REQ = array( 'safe_mode' => 'off' , 'file_uploads' => '1' , 'magic_quotes_runtime' => 'off' //INI_ALL , 'magic_quotes_gpc' => 'off' //INI_PER_DIR -- just for check ); public static function is_installed() { $appConf = new \Alchemy\Phrasea\Core\Configuration\Application(); $installed = false; try { $appConf->getConfigurationFile(); $appConf->getConnexionFile(); $appConf->getServiceFile(); $installed = true; } catch (\Exception $e) { } return $installed; } public static function needUpgradeConfigurationFile() { return (is_file(__DIR__ . "/../../config/connexion.inc") && is_file(__DIR__ . "/../../config/config.inc")); } function create_global_values(registryInterface &$registry, $datas = array()) { require(__DIR__ . "/../../lib/conf.d/_GV_template.inc"); if ($registry->is_set('GV_timezone')) date_default_timezone_set($registry->get('GV_timezone')); else date_default_timezone_set('Europe/Berlin'); $debug = $log_errors = false; $vars = array(); $error = false; $extra_conf = ''; foreach ($GV as $section) { foreach ($section['vars'] as $variable) { if (isset($datas[$variable['name']]) === false) { if (isset($variable['default'])) { if ($variable['type'] === 'boolean') { if ($variable['default'] === true) $datas[$variable['name']] = '1'; else $datas[$variable['name']] = '0'; } else { $datas[$variable['name']] = $variable['default']; } } } $type = 'string'; switch ($variable['type']) { case 'string': case 'password': $datas[$variable['name']] = (string) trim($datas[$variable['name']]); break; case 'enum': if (!isset($variable['available'])) { $variable['error'] = 'avalaibility'; } elseif (!is_array($variable['available'])) { $variable['error'] = 'avalaibility'; } elseif (!in_array($datas[$variable['name']], $variable['available'])) { $variable['error'] = 'avalaibility'; } break; case 'enum_multi': if (!isset($datas[$variable['name']])) $datas[$variable['name']] = null; $datas[$variable['name']] = ($datas[$variable['name']]); $type = 'array'; break; case 'boolean': $datas[$variable['name']] = strtolower($datas[$variable['name']]) === 'true' ? '1' : '0'; $type = 'boolean'; break; case 'integer': $datas[$variable['name']] = (int) trim($datas[$variable['name']]); $type = 'integer'; break; case 'text': $datas[$variable['name']] = trim($datas[$variable['name']]); break; case 'timezone': $datas[$variable['name']] = trim($datas[$variable['name']]); break; default: $error = true; break; } if (isset($variable['required']) && $variable['required'] === true && trim($datas[$variable['name']]) === '') $variable['error'] = 'required'; if (isset($variable['end_slash'])) { if ($variable['end_slash'] === true) { $datas[$variable['name']] = trim($datas[$variable['name']]) !== '' ? p4string::addEndSlash($datas[$variable['name']]) : ''; } if ($variable['end_slash'] === false) { $datas[$variable['name']] = trim($datas[$variable['name']]) !== '' ? p4string::delEndSlash($datas[$variable['name']]) : ''; } } if ($variable['name'] === 'GV_debug' && $datas[$variable['name']] === '1') $debug = true; if ($variable['name'] === 'GV_log_errors' && $datas[$variable['name']] === '1') $log_errors = true; if ($variable['type'] !== 'integer' && $variable['type'] !== 'boolean') $datas[$variable['name']] = $datas[$variable['name']]; $vars[$variable['name']] = array('value' => $datas[$variable['name']], 'type' => $type); } } if ($error === false) { foreach ($vars as $key => $values) { $registry->set($key, $values['value'], $values['type']); } return true; } return false; } public static function check_binaries(registryInterface $registry) { $binaries = array( 'PHP CLI' => $registry->get('GV_cli'), 'ImageMagick (convert)' => $registry->get('GV_imagick'), 'PDF 2 SWF' => $registry->get('GV_pdf2swf'), 'Unoconv' => $registry->get('GV_unoconv'), 'SWFextract' => $registry->get('GV_swf_extract'), 'SWFrender' => $registry->get('GV_swf_render'), 'MP4Box' => $registry->get('GV_mp4box'), 'xpdf (pdf2text)' => $registry->get('GV_pdftotext'), 'ImageMagick (composite)' => $registry->get('GV_pathcomposite'), 'Exiftool' => $registry->get('GV_exiftool'), 'FFmpeg' => $registry->get('GV_ffmpeg'), 'MPlayer' => $registry->get('GV_mplayer') ); $constraints = array(); foreach ($binaries as $name => $binary) { if (trim($binary) == '' || (!is_file($binary))) { $constraints[] = new Setup_Constraint( $name , false , sprintf('%s missing', $name) , false ); } else { if (!is_executable($binary)) { $constraints[] = new Setup_Constraint( $name , false , sprintf('%s not executeable', $name) , true ); } else { $constraints[] = new Setup_Constraint( $name , true , sprintf('%s OK', $name) , true ); } } } return new Setup_ConstraintsIterator($constraints); } public static function discover_binaries() { if (system_server::get_platform() == 'WINDOWS') { $exiftool = dirname(__DIR__) . '/vendor/exiftool/exiftool.exe'; $indexer = dirname(dirname(__DIR__)) . '/bin/phraseanet_indexer.exe'; } else { $exiftool = dirname(__DIR__) . '/vendor/exiftool/exiftool'; $indexer = null; } return array( 'php' => array('name' => 'PHP CLI', 'binary' => self::discover_binary('php')), 'exiftool' => array('name' => 'Exiftool', 'binary' => self::discover_binary('exiftool', array($exiftool))), 'phraseanet_indexer' => array('name' => 'Indexeur Phrasea', 'binary' => self::discover_binary('phraseanet_indexer', array($indexer))), 'convert' => array('name' => 'ImageMagick (convert)', 'binary' => self::discover_binary('convert')), 'composite' => array('name' => 'ImageMagick (composite)', 'binary' => self::discover_binary('composite')), 'pdf2swf' => array('name' => 'PDF 2 SWF', 'binary' => self::discover_binary('pdf2swf')), 'unoconv' => array('name' => 'Unoconv', 'binary' => self::discover_binary('unoconv')), 'swfextract' => array('name' => 'SWFextract', 'binary' => self::discover_binary('swfextract')), 'swfrender' => array('name' => 'SWFrender', 'binary' => self::discover_binary('swfrender')), 'MP4Box' => array('name' => 'MP4Box', 'binary' => self::discover_binary('MP4Box')), 'xpdf' => array('name' => 'XPDF', 'binary' => self::discover_binary('xpdf')), 'ffmpeg' => array('name' => 'FFmpeg', 'binary' => self::discover_binary('ffmpeg')), 'mplayer' => array('name' => 'MPlayer', 'binary' => self::discover_binary('mplayer')) ); } protected static function discover_binary($binary, array $look_here = array()) { if (system_server::get_platform() == 'WINDOWS') return null; foreach ($look_here as $place) { if (is_executable($place)) return $place; } return exec(sprintf('which %s', $binary)); } function check_mod_auth_token() { $registry = registry::get_instance(); if ($registry->get('GV_h264_streaming') !== true) return; ?>

mod_auth_token configuration

Apache Server mods avalaibility