diff --git a/include/class.i18n.php b/include/class.i18n.php index 2c4d658f168ef7f0a914aa7869bb8a943ddf4ace..b61be4beb165ee6f714337599affd3583da1ee0f 100644 --- a/include/class.i18n.php +++ b/include/class.i18n.php @@ -277,7 +277,8 @@ class DataTemplate { $this->filepath = Misc::realpath("{$this->base}/$l/$path"); break; } - elseif (Phar::isValidPharFilename("{$this->base}/$l.phar") + elseif (class_exists('Phar') + && Phar::isValidPharFilename("{$this->base}/$l.phar") && file_exists("phar://{$this->base}/$l.phar/$path")) { $this->lang = $l; $this->filepath = "phar://{$this->base}/$l.phar/$path"; diff --git a/include/class.plugin.php b/include/class.plugin.php index 6a8ac830b8d372b3dd9974af60ca555635e77898..a86d661e4a7cf298f241618c80097d7b9d430f5d 100644 --- a/include/class.plugin.php +++ b/include/class.plugin.php @@ -180,6 +180,7 @@ class PluginManager { GLOB_NOSORT|GLOB_BRACE) as $p) { $is_phar = false; if (substr($p, strlen($p) - 5) == '.phar' + && class_exists('Phar') && Phar::isValidPharFilename($p)) { try { // When public key is invalid, openssl throws a diff --git a/include/staff/system.inc.php b/include/staff/system.inc.php index 6b59f0a08c13dd35cff13a7a22576aba6a81ae84..4cfb3608c8021d1b579f8431642f03d46924044e 100644 --- a/include/staff/system.inc.php +++ b/include/staff/system.inc.php @@ -48,6 +48,21 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access echo extension_loaded('mbstring')?'check':'warning-sign'; ?>"></i></td> <td>mbstring</td> <td>Highly recommended for non western european language content</td></tr> + <tr><td><i class="icon icon-<?php + echo extension_loaded('phar')?'check':'warning-sign'; ?>"></i></td> + <td>phar</td> + <td>Highly recommended for plugins and language packs</td></tr> + </tbody></table></td></tr> + <tr><td>PHP Settings</td> + <td><table><tbody> + <tr><td><i class="icon icon-<?php + echo extension_loaded('mbstring')?'check':'warning-sign'; ?>"></i> + </td><td> + <code>cgi.fix_pathinfo</code> = + <?php echo ini_get('cgi.fix_pathinfo'); ?> + </td><td> + <span class="faded">"1" is recommended if AJAX is not working</span> + </td></tr> </tbody></table></td></tr> </tbody> <thead> diff --git a/setup/inc/install-prereq.inc.php b/setup/inc/install-prereq.inc.php index f004ba6883fbd858e51f09fc2db92edadddc6cc0..fa86058ba3744075b8d933d0317d3f5d90aaee2b 100644 --- a/setup/inc/install-prereq.inc.php +++ b/setup/inc/install-prereq.inc.php @@ -29,6 +29,7 @@ if(!defined('SETUPINC')) die('Kwaheri!'); <li class="<?php echo extension_loaded('json')?'yes':'no'; ?>">PHP JSON extension (faster performance)</li> <li class="<?php echo extension_loaded('gettext')?'yes':'no'; ?>">Gettext is used for translations (faster performance)</li> <li class="<?php echo extension_loaded('mbstring')?'yes':'no'; ?>">Mbstring is <b>strongly</b> recommended for all installations</li> + <li class="<?php echo extension_loaded('phar')?'yes':'no'; ?>">Phar is <b>strongly</b> recommended for plugins and language packs</li> </ul> <div id="bar"> <form method="post" action="install.php">