From ab4ece6780cf841f6ce4e89f7b81a1ff1661f615 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 24 Oct 2016 01:41:09 +0200 Subject: CLI do-install https://github.com/FreshRSS/FreshRSS/issues/1095 https://github.com/FreshRSS/FreshRSS/issues/1090 --- lib/lib_install.php | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 lib/lib_install.php (limited to 'lib/lib_install.php') diff --git a/lib/lib_install.php b/lib/lib_install.php new file mode 100644 index 000000000..0e7b7f036 --- /dev/null +++ b/lib/lib_install.php @@ -0,0 +1,115 @@ += 0; + $minz = file_exists(join_path(LIB_PATH, 'Minz')); + $curl = extension_loaded('curl'); + $pdo_mysql = extension_loaded('pdo_mysql'); + $pdo_sqlite = extension_loaded('pdo_sqlite'); + $pdo_pgsql = extension_loaded('pdo_pgsql'); + $pdo = $pdo_mysql || $pdo_sqlite || $pdo_pgsql; + $pcre = extension_loaded('pcre'); + $ctype = extension_loaded('ctype'); + $dom = class_exists('DOMDocument'); + $xml = function_exists('xml_parser_create'); + $json = function_exists('json_encode'); + $data = DATA_PATH && is_writable(DATA_PATH); + $cache = CACHE_PATH && is_writable(CACHE_PATH); + $users = USERS_PATH && is_writable(USERS_PATH); + $favicons = is_writable(join_path(DATA_PATH, 'favicons')); + $http_referer = is_referer_from_same_domain(); + + return array( + 'php' => $php ? 'ok' : 'ko', + 'minz' => $minz ? 'ok' : 'ko', + 'curl' => $curl ? 'ok' : 'ko', + 'pdo-mysql' => $pdo_mysql ? 'ok' : 'ko', + 'pdo-sqlite' => $pdo_sqlite ? 'ok' : 'ko', + 'pdo-pgsql' => $pdo_pgsql ? 'ok' : 'ko', + 'pdo' => $pdo ? 'ok' : 'ko', + 'pcre' => $pcre ? 'ok' : 'ko', + 'ctype' => $ctype ? 'ok' : 'ko', + 'dom' => $dom ? 'ok' : 'ko', + 'xml' => $xml ? 'ok' : 'ko', + 'json' => $json ? 'ok' : 'ko', + 'data' => $data ? 'ok' : 'ko', + 'cache' => $cache ? 'ok' : 'ko', + 'users' => $users ? 'ok' : 'ko', + 'favicons' => $favicons ? 'ok' : 'ko', + 'http_referer' => $http_referer ? 'ok' : 'ko', + 'all' => $php && $minz && $curl && $pdo && $pcre && $ctype && $dom && $xml && + $data && $cache && $users && $favicons && $http_referer ? + 'ok' : 'ko' + ); +} + +function generateSalt() { + return sha1(uniqid(mt_rand(), true).implode('', stat(__FILE__))); +} + +function checkDb(&$dbOptions) { + $dsn = ''; + try { + $driver_options = null; + switch ($dbOptions['type']) { + case 'mysql': + include_once(APP_PATH . '/SQL/install.sql.mysql.php'); + $driver_options = array( + PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4' + ); + try { // on ouvre une connexion juste pour créer la base si elle n'existe pas + $dsn = 'mysql:host=' . $dbOptions['host'] . ';'; + $c = new PDO($dsn, $dbOptions['user'], $dbOptions['password'], $driver_options); + $sql = sprintf(SQL_CREATE_DB, $dbOptions['base']); + $res = $c->query($sql); + } catch (PDOException $e) { + syslog(LOG_DEBUG, 'FreshRSS MySQL warning: ' . $e->getMessage()); + } + // on écrase la précédente connexion en sélectionnant la nouvelle BDD + $dsn = 'mysql:host=' . $dbOptions['host'] . ';dbname=' . $dbOptions['base']; + break; + case 'sqlite': + include_once(APP_PATH . '/SQL/install.sql.sqlite.php'); + $dsn = 'sqlite:' . join_path(USERS_PATH, $dbOptions['default_user'], 'db.sqlite'); + $driver_options = array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + ); + break; + case 'pgsql': + include_once(APP_PATH . '/SQL/install.sql.pgsql.php'); + $driver_options = array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + ); + try { // on ouvre une connexion juste pour créer la base si elle n'existe pas + $dsn = 'pgsql:host=' . $dbOptions['host'] . ';dbname=postgres'; + $c = new PDO($dsn, $dbOptions['user'], $dbOptions['password'], $driver_options); + $sql = sprintf(SQL_CREATE_DB, $dbOptions['base']); + $res = $c->query($sql); + } catch (PDOException $e) { + syslog(LOG_DEBUG, 'FreshRSS PostgreSQL warning: ' . $e->getMessage()); + } + // on écrase la précédente connexion en sélectionnant la nouvelle BDD + $dsn = 'pgsql:host=' . $dbOptions['host'] . ';dbname=' . $dbOptions['base']; + break; + default: + return false; + } + } catch (PDOException $e) { + $dsn = ''; + $dbOptions['error'] = $e->getMessage(); + } + $dbOptions['dsn'] = $dsn; + $dbOptions['options'] = $driver_options; + return $dsn != ''; +} + +function deleteInstall() { + $path = join_path(DATA_PATH, 'do-install.txt'); + @unlink($path); + return !file_exists($path); +} -- cgit v1.2.3 From 829d9997d31929b45384808f7cca343edb00b0d2 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 6 Nov 2016 14:04:06 +0100 Subject: Fix small bugs in install Small fixes in install (e.g. better check that DB password works) --- CHANGELOG.md | 1 + app/Models/UserDAO.php | 1 - app/install.php | 4 ++-- cli/README.md | 4 ++-- cli/create-user.php | 3 +++ cli/do-install.php | 12 ++++++------ data/config.default.php | 2 +- lib/lib_install.php | 6 +++++- 8 files changed, 20 insertions(+), 13 deletions(-) (limited to 'lib/lib_install.php') diff --git a/CHANGELOG.md b/CHANGELOG.md index 52d95d7bd..9410ac339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Bug fixing * Fix bug in estimating last user activity [#1358](https://github.com/FreshRSS/FreshRSS/issues/1358) * PostgreSQL: fix bug when updating cached values [#1360](https://github.com/FreshRSS/FreshRSS/issues/1360) + * Fix small bugs in installer [#1363](https://github.com/FreshRSS/FreshRSS/pull/1363) ## 2016-11-02 FreshRSS 1.6.1 diff --git a/app/Models/UserDAO.php b/app/Models/UserDAO.php index 190954b1a..32bc6de2f 100644 --- a/app/Models/UserDAO.php +++ b/app/Models/UserDAO.php @@ -88,7 +88,6 @@ class FreshRSS_UserDAO extends Minz_ModelPdo { if (($username == '') || (!ctype_alnum($username))) { $username = Minz_Session::param('currentUser', '_'); } - Minz_Log::debug('touch ' . $username); return touch(join_path(DATA_PATH , 'users', $username, 'config.php')); } diff --git a/app/install.php b/app/install.php index fcc901713..5c8a6e0e8 100644 --- a/app/install.php +++ b/app/install.php @@ -230,7 +230,7 @@ function saveStep3() { $_SESSION['bd_error'] = ''; header('Location: index.php?step=4'); } else { - $_SESSION['bd_error'] = empty($config_array['db']['bd_error']) ? 'Unknown error!' : $config_array['db']['bd_error']; + $_SESSION['bd_error'] = empty($config_array['db']['error']) ? 'Unknown error!' : $config_array['db']['error']; } } invalidateHttpCache(); @@ -375,7 +375,7 @@ function checkDbUser(&$dbOptions) { } } catch (PDOException $e) { $ok = false; - $dbOptions['bd_error'] = $e->getMessage(); + $dbOptions['error'] = $e->getMessage(); } return $ok; } diff --git a/cli/README.md b/cli/README.md index 35c0033a4..25b12234c 100644 --- a/cli/README.md +++ b/cli/README.md @@ -32,8 +32,8 @@ Options in parenthesis are optional. ```sh cd /usr/share/FreshRSS -./cli/do-install.php --default_user admin --auth_type form ( --environment production --base_url https://rss.example.net/ --title FreshRSS --allow_anonymous --api_enabled --db-type mysql --db-host localhost:3306 --db-user freshrss --db-password dbPassword123 --db-base freshrss --db-prefix freshrss ) -# --auth_type can be: 'form' (recommended), 'http_auth' (using the Web server access control), 'none' (dangerous) +./cli/do-install.php --default_user admin ( --auth_type form --environment production --base_url https://rss.example.net/ --title FreshRSS --allow_anonymous --api_enabled --db-type mysql --db-host localhost:3306 --db-user freshrss --db-password dbPassword123 --db-base freshrss --db-prefix freshrss ) +# --auth_type can be: 'form' (default), 'http_auth' (using the Web server access control), 'none' (dangerous) # --db-type can be: 'sqlite' (default), 'mysql' (MySQL or MariaDB), 'pgsql' (PostgreSQL) # --environment can be: 'production' (default), 'development' (for additional log messages) # --db-prefix is an optional prefix in front of the names of the tables diff --git a/cli/create-user.php b/cli/create-user.php index 008b82ce3..444264cc7 100755 --- a/cli/create-user.php +++ b/cli/create-user.php @@ -43,6 +43,9 @@ if (!$ok) { invalidateHttpCache(FreshRSS_Context::$system_conf->default_user); +echo '• Remember to refresh the feeds of the user: ', $username , "\n", + "\t", './cli/actualize-user.php --user ', $username, "\n"; + accessRights(); done($ok); diff --git a/cli/do-install.php b/cli/do-install.php index 667191680..b687b86cb 100755 --- a/cli/do-install.php +++ b/cli/do-install.php @@ -26,9 +26,9 @@ $dBparams = array( $options = getopt('', array_merge($params, $dBparams)); -if (empty($options['default_user']) || empty($options['auth_type'])) { - fail('Usage: ' . basename(__FILE__) . " --default_user admin --auth_type form" . - " ( --environment production --base_url https://rss.example.net/" . +if (empty($options['default_user'])) { + fail('Usage: ' . basename(__FILE__) . " --default_user admin ( --auth_type form" . + " --environment production --base_url https://rss.example.net/" . " --title FreshRSS --allow_anonymous --api_enabled" . " --db-type mysql --db-host localhost:3306 --db-user freshrss --db-password dbPassword123" . " --db-base freshrss --db-prefix freshrss )"); @@ -51,7 +51,7 @@ if (!ctype_alnum($options['default_user'])) { fail('FreshRSS invalid default username (must be ASCII alphanumeric): ' . $options['default_user']); } -if (!in_array($options['auth_type'], array('form', 'http_auth', 'none'))) { +if (isset($options['auth_type']) && !in_array($options['auth_type'], array('form', 'http_auth', 'none'))) { fail('FreshRSS invalid authentication method (auth_type must be one of { form, http_auth, none }: ' . $options['auth_type']); } @@ -86,11 +86,11 @@ if (file_put_contents(join_path(DATA_PATH, 'config.php'), " 'none', + 'auth_type' => 'form', # Allow or not the use of the API, used for mobile apps. # End-point is http://example.net/FreshRSS/p/api/greader.php diff --git a/lib/lib_install.php b/lib/lib_install.php index 0e7b7f036..dd8090bcd 100644 --- a/lib/lib_install.php +++ b/lib/lib_install.php @@ -54,8 +54,8 @@ function generateSalt() { function checkDb(&$dbOptions) { $dsn = ''; + $driver_options = null; try { - $driver_options = null; switch ($dbOptions['type']) { case 'mysql': include_once(APP_PATH . '/SQL/install.sql.mysql.php'); @@ -99,8 +99,12 @@ function checkDb(&$dbOptions) { default: return false; } + + $c = new PDO($dsn, $dbOptions['user'], $dbOptions['password'], $driver_options); + $res = $c->query('SELECT 1'); } catch (PDOException $e) { $dsn = ''; + syslog(LOG_DEBUG, 'FreshRSS SQL warning: ' . $e->getMessage()); $dbOptions['error'] = $e->getMessage(); } $dbOptions['dsn'] = $dsn; -- cgit v1.2.3 From b28b6a4bf273253d1bb57b99a80fa7ae77a48397 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 20 Nov 2016 16:52:07 +0100 Subject: extension_loaded fileinfo https://github.com/FreshRSS/FreshRSS/issues/1375 --- app/i18n/cz/admin.php | 4 ++++ app/i18n/cz/install.php | 4 ++++ app/i18n/de/admin.php | 4 ++++ app/i18n/de/install.php | 4 ++++ app/i18n/en/admin.php | 4 ++++ app/i18n/en/install.php | 4 ++++ app/i18n/fr/admin.php | 4 ++++ app/i18n/fr/install.php | 4 ++++ app/i18n/it/admin.php | 4 ++++ app/i18n/it/install.php | 4 ++++ app/i18n/nl/admin.php | 4 ++++ app/i18n/nl/install.php | 4 ++++ app/i18n/ru/admin.php | 4 ++++ app/i18n/ru/install.php | 4 ++++ app/i18n/tr/admin.php | 4 ++++ app/i18n/tr/install.php | 4 ++++ app/install.php | 6 ++++++ lib/lib_install.php | 4 +++- lib/lib_rss.php | 1 + 19 files changed, 74 insertions(+), 1 deletion(-) (limited to 'lib/lib_install.php') diff --git a/app/i18n/cz/admin.php b/app/i18n/cz/admin.php index 84bc58a17..63cee3cca 100644 --- a/app/i18n/cz/admin.php +++ b/app/i18n/cz/admin.php @@ -57,6 +57,10 @@ return array( 'nok' => 'Tabulka kanálů je nastavena špatně.', 'ok' => 'Tabulka kanálů je v pořádku.', ), + 'fileinfo' => array( + 'nok' => 'Nemáte PHP fileinfo (balíček fileinfo).', + 'ok' => 'Máte rozšíření fileinfo.', + ), 'files' => 'Instalace souborů', 'json' => array( 'nok' => 'Nemáte JSON (balíček php5-json).', diff --git a/app/i18n/cz/install.php b/app/i18n/cz/install.php index c40ae46e2..ea4812ea5 100644 --- a/app/i18n/cz/install.php +++ b/app/i18n/cz/install.php @@ -56,6 +56,10 @@ return array( 'nok' => 'Zkontrolujte oprávnění adresáře ./data/favicons. HTTP server musí mít do tohoto adresáře práva zápisu', 'ok' => 'Oprávnění adresáře favicons jsou v pořádku.', ), + 'fileinfo' => array( + 'nok' => 'Nemáte PHP fileinfo (balíček fileinfo).', + 'ok' => 'Máte rozšíření fileinfo.', + ), 'http_referer' => array( 'nok' => 'Zkontrolujte prosím že neměníte HTTP REFERER.', 'ok' => 'Váš HTTP REFERER je znám a odpovídá Vašemu serveru.', diff --git a/app/i18n/de/admin.php b/app/i18n/de/admin.php index c12f32bc8..8fc43a7bb 100644 --- a/app/i18n/de/admin.php +++ b/app/i18n/de/admin.php @@ -57,6 +57,10 @@ return array( 'nok' => 'Die Tabelle feed ist schlecht konfiguriert.', 'ok' => 'Die Tabelle feed ist korrekt konfiguriert.', ), + 'fileinfo' => array( + 'nok' => 'Ihnen fehlt PHP fileinfo (Paket fileinfo).', + 'ok' => 'Sie haben die fileinfo-Erweiterung.', + ), 'files' => 'Datei-Installation', 'json' => array( 'nok' => 'Ihnen fehlt die JSON-Erweiterung (Paket php5-json).', diff --git a/app/i18n/de/install.php b/app/i18n/de/install.php index 178e8ea4c..b747d1551 100644 --- a/app/i18n/de/install.php +++ b/app/i18n/de/install.php @@ -56,6 +56,10 @@ return array( 'nok' => 'Überprüfen Sie die Berechtigungen des Verzeichnisses ./data/favicons. Der HTTP-Server muss Schreibrechte besitzen.', 'ok' => 'Die Berechtigungen des Verzeichnisses ./data/favicons sind in Ordnung.', ), + 'fileinfo' => array( + 'nok' => 'Ihnen fehlt PHP fileinfo (Paket fileinfo).', + 'ok' => 'Sie haben die fileinfo-Erweiterung.', + ), 'http_referer' => array( 'nok' => 'Bitte stellen Sie sicher, dass Sie Ihren HTTP REFERER nicht abändern.', 'ok' => 'Ihr HTTP REFERER ist bekannt und entspricht Ihrem Server.', diff --git a/app/i18n/en/admin.php b/app/i18n/en/admin.php index e5286d948..e94d9fa80 100644 --- a/app/i18n/en/admin.php +++ b/app/i18n/en/admin.php @@ -57,6 +57,10 @@ return array( 'nok' => 'Feed table is bad configured.', 'ok' => 'Feed table is ok.', ), + 'fileinfo' => array( + 'nok' => 'Cannot find the PHP fileinfo library (fileinfo package).', + 'ok' => 'You have the fileinfo library.', + ), 'files' => 'File installation', 'json' => array( 'nok' => 'Cannot find JSON (php5-json package).', diff --git a/app/i18n/en/install.php b/app/i18n/en/install.php index 63d31fe53..40fff37dd 100644 --- a/app/i18n/en/install.php +++ b/app/i18n/en/install.php @@ -56,6 +56,10 @@ return array( 'nok' => 'Check permissions on ./data/favicons directory. HTTP server must have rights to write into', 'ok' => 'Permissions on favicons directory are good.', ), + 'fileinfo' => array( + 'nok' => 'Cannot find the PHP fileinfo library (fileinfo package).', + 'ok' => 'You have the fileinfo library.', + ), 'http_referer' => array( 'nok' => 'Please check that you are not altering your HTTP REFERER.', 'ok' => 'Your HTTP REFERER is known and corresponds to your server.', diff --git a/app/i18n/fr/admin.php b/app/i18n/fr/admin.php index e9263a5e2..9a13ecc21 100644 --- a/app/i18n/fr/admin.php +++ b/app/i18n/fr/admin.php @@ -57,6 +57,10 @@ return array( 'nok' => 'La table feed est mal configurée.', 'ok' => 'La table feed est bien configurée.', ), + 'fileinfo' => array( + 'nok' => 'Impossible de trouver la librairie PHP fileinfo (paquet fileinfo).', + 'ok' => 'Vous disposez de la librairie fileinfo.', + ), 'files' => 'Installation des fichiers', 'json' => array( 'nok' => 'Vous ne disposez pas de JSON (paquet php5-json).', diff --git a/app/i18n/fr/install.php b/app/i18n/fr/install.php index c50807107..09625de78 100644 --- a/app/i18n/fr/install.php +++ b/app/i18n/fr/install.php @@ -56,6 +56,10 @@ return array( 'nok' => 'Veuillez vérifier les droits sur le répertoire ./data/favicons. Le serveur HTTP doit être capable d’écrire dedans', 'ok' => 'Les droits sur le répertoire des favicons sont bons.', ), + 'fileinfo' => array( + 'nok' => 'Vous ne disposez pas de PHP fileinfo (paquet fileinfo).', + 'ok' => 'Vous disposez de fileinfo.', + ), 'http_referer' => array( 'nok' => 'Veuillez vérifier que vous ne modifiez pas votre HTTP REFERER.', 'ok' => 'Le HTTP REFERER est connu et semble correspondre à votre serveur.', diff --git a/app/i18n/it/admin.php b/app/i18n/it/admin.php index c399bc8c8..ae46818ae 100644 --- a/app/i18n/it/admin.php +++ b/app/i18n/it/admin.php @@ -57,6 +57,10 @@ return array( 'nok' => 'La tabella Feed ha una configurazione errata.', 'ok' => 'Tabella Feed OK.', ), + 'fileinfo' => array( + 'nok' => 'Manca il supporto per PHP fileinfo (pacchetto fileinfo).', + 'ok' => 'Estensione fileinfo presente.', + ), 'files' => 'Installazione files', 'json' => array( 'nok' => 'Manca il supoorto a JSON (pacchetto php5-json).', diff --git a/app/i18n/it/install.php b/app/i18n/it/install.php index 2fa298508..18f8cc337 100644 --- a/app/i18n/it/install.php +++ b/app/i18n/it/install.php @@ -56,6 +56,10 @@ return array( 'nok' => 'Verifica i permessi sulla cartella ./data/favicons. Il server HTTP deve avere i permessi per scriverci dentro', 'ok' => 'I permessi sulla cartella favicons sono corretti.', ), + 'fileinfo' => array( + 'nok' => 'Manca il supporto per PHP fileinfo (pacchetto fileinfo).', + 'ok' => 'Estensione fileinfo presente.', + ), 'http_referer' => array( 'nok' => 'Per favore verifica che non stai alterando il tuo HTTP REFERER.', 'ok' => 'Il tuo HTTP REFERER riconosciuto corrisponde al tuo server.', diff --git a/app/i18n/nl/admin.php b/app/i18n/nl/admin.php index 59637bfef..607fb1892 100644 --- a/app/i18n/nl/admin.php +++ b/app/i18n/nl/admin.php @@ -57,6 +57,10 @@ return array( 'nok' => 'Feed tabel is slecht geconfigureerd.', 'ok' => 'Feed tabel is ok.', ), + 'fileinfo' => array( + 'nok' => 'U mist de PHP fileinfo (fileinfo package).', + 'ok' => 'U hebt de fileinfo uitbreiding.', + ), 'files' => 'Bestanden installatie', 'json' => array( 'nok' => 'U mist JSON (php5-json package).', diff --git a/app/i18n/nl/install.php b/app/i18n/nl/install.php index bd2ba0cce..79db9c794 100644 --- a/app/i18n/nl/install.php +++ b/app/i18n/nl/install.php @@ -56,6 +56,10 @@ return array( 'nok' => 'Controleer permissies van de ./data/favicons map. HTTP server moet rechten hebben om er in te kunnen schrijven', 'ok' => 'Permissies van de favicons map zijn goed.', ), + 'fileinfo' => array( + 'nok' => 'U mist PHP fileinfo (fileinfo package).', + 'ok' => 'U hebt de fileinfo uitbreiding.', + ), 'http_referer' => array( 'nok' => 'Controleer a.u.b. dat u niet uw HTTP REFERER wijzigd.', 'ok' => 'Uw HTTP REFERER is bekend en komt overeen met uw server.', diff --git a/app/i18n/ru/admin.php b/app/i18n/ru/admin.php index 355100689..f5da97371 100644 --- a/app/i18n/ru/admin.php +++ b/app/i18n/ru/admin.php @@ -57,6 +57,10 @@ return array( 'nok' => 'Таблица подписок (feed) неправильно настроена.', 'ok' => 'Таблица подписок (feed) настроена правильно.', ), + 'fileinfo' => array( + 'nok' => 'У вас не установлено расширение PHP fileinfo (пакет fileinfo).', + 'ok' => 'У вас установлено расширение fileinfo.', + ), 'files' => 'Установка файлов', 'json' => array( 'nok' => 'У вас не установлена библиотека для работы с JSON (пакет php5-json).', diff --git a/app/i18n/ru/install.php b/app/i18n/ru/install.php index bad59bbb3..1dea2cd66 100644 --- a/app/i18n/ru/install.php +++ b/app/i18n/ru/install.php @@ -56,6 +56,10 @@ return array( 'nok' => 'Проверьте права доступа к папке ./data/favicons . Сервер HTTP должен иметь права на запись в эту папку.', 'ok' => 'Права на папку значков в порядке.', ), + 'fileinfo' => array( + 'nok' => 'У вас нет расширения PHP fileinfo (пакет fileinfo).', + 'ok' => 'У вас установлено расширение fileinfo.', + ), 'http_referer' => array( 'nok' => 'Убедитесь, что вы не изменяете ваш HTTP REFERER.', 'ok' => 'Ваш HTTP REFERER известен и соотвествует вашему серверу.', diff --git a/app/i18n/tr/admin.php b/app/i18n/tr/admin.php index e0dbd288d..9d10ef9dd 100644 --- a/app/i18n/tr/admin.php +++ b/app/i18n/tr/admin.php @@ -57,6 +57,10 @@ return array( 'nok' => 'Akış tablosu kötü yapılandırılmış.', 'ok' => 'Akış tablosu sorunsuz.', ), + 'fileinfo' => array( + 'nok' => 'PHP fileinfo eksik (fileinfo package).', + 'ok' => 'fileinfo eklentisi sorunsuz.', + ), 'files' => 'Dosya kurulumu', 'json' => array( 'nok' => 'JSON eklentisi eksik (php5-json package).', diff --git a/app/i18n/tr/install.php b/app/i18n/tr/install.php index 4daa45099..d5564297b 100644 --- a/app/i18n/tr/install.php +++ b/app/i18n/tr/install.php @@ -56,6 +56,10 @@ return array( 'nok' => './data/favicons klasör yetkisini kontrol edin. HTTP yazma yetkisi olmalı', 'ok' => 'Site ikonu klasörü yetkileri sorunsuz.', ), + 'fileinfo' => array( + 'nok' => 'PHP fileinfo eksik (fileinfo package).', + 'ok' => 'fileinfo eklentisi sorunsuz.', + ), 'http_referer' => array( 'nok' => 'Lütfen HTTP REFERER değiştirmediğinize emin olun.', 'ok' => 'HTTP REFERER ve sunucunuz arası iletişim sorunsuz.', diff --git a/app/install.php b/app/install.php index 869bf076f..986a7dc60 100644 --- a/app/install.php +++ b/app/install.php @@ -478,6 +478,12 @@ function printStep1() {

+ +

+ +

+ +

diff --git a/lib/lib_install.php b/lib/lib_install.php index dd8090bcd..c5cae4293 100644 --- a/lib/lib_install.php +++ b/lib/lib_install.php @@ -15,6 +15,7 @@ function checkRequirements() { $pdo = $pdo_mysql || $pdo_sqlite || $pdo_pgsql; $pcre = extension_loaded('pcre'); $ctype = extension_loaded('ctype'); + $fileinfo = extension_loaded('fileinfo'); $dom = class_exists('DOMDocument'); $xml = function_exists('xml_parser_create'); $json = function_exists('json_encode'); @@ -34,6 +35,7 @@ function checkRequirements() { 'pdo' => $pdo ? 'ok' : 'ko', 'pcre' => $pcre ? 'ok' : 'ko', 'ctype' => $ctype ? 'ok' : 'ko', + 'fileinfo' => $fileinfo ? 'ok' : 'ko', 'dom' => $dom ? 'ok' : 'ko', 'xml' => $xml ? 'ok' : 'ko', 'json' => $json ? 'ok' : 'ko', @@ -42,7 +44,7 @@ function checkRequirements() { 'users' => $users ? 'ok' : 'ko', 'favicons' => $favicons ? 'ok' : 'ko', 'http_referer' => $http_referer ? 'ok' : 'ko', - 'all' => $php && $minz && $curl && $pdo && $pcre && $ctype && $dom && $xml && + 'all' => $php && $minz && $curl && $pdo && $pcre && $ctype && $fileinfo && $dom && $xml && $data && $cache && $users && $favicons && $http_referer ? 'ok' : 'ko' ); diff --git a/lib/lib_rss.php b/lib/lib_rss.php index fc68a96d3..560e5b256 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -398,6 +398,7 @@ function check_install_php() { 'pdo' => $pdo_mysql || $pdo_sqlite, 'pcre' => extension_loaded('pcre'), 'ctype' => extension_loaded('ctype'), + 'fileinfo' => extension_loaded('fileinfo'), 'dom' => class_exists('DOMDocument'), 'json' => extension_loaded('json'), 'zip' => extension_loaded('zip'), -- cgit v1.2.3