| Current Path : /home/siteany/www/ |
| Current File : /home/siteany/www/spip_loader.php |
<?php
namespace Spip\Loader;
use Phar;
final class Stub {
const VERSION = '6.1.6';
const FULL_VERSION = '6.1.6';
const DATE = '2024-02-20 13:40:14';
const DEBUG = false;
const NAME = 'spip_loader.phar';
const AUTOLOADER = 'phar://spip_loader.phar/vendor/autoload.php';
/** @return void */
public function init() {
Phar::mapPhar(self::NAME);
if ($this->is_opcache_enabled()) {
// some hosting failed re-opening inside phar files :/
// and some weird cache occurs sometimes into phar content files
@ini_set('opcache.enable', 0);
}
require self::AUTOLOADER;
Debug::add('FULL_VERSION', self::VERSION);
Debug::add('DATE', self::DATE);
}
/** @return void */
public function handle() {
if ($this->is_route('warmup') && function_exists('opcache_reset')) {
// Route `spip_loader.php?warmup` that could help on some hosting and some opcache configs.
// Please don’t use this abusively as it clears cache for all files in the fpm instance (not only this website)
@opcache_reset();
Debug::add('Reset Opcache', 'Script reset Opcache.');
}
if (!http_response_code()) {
$this->handle_cli();
} else {
$this->handle_web();
}
}
/** @return never */
public function handle_cli() {
require 'phar://spip_loader.phar/bin/console.php';
exit(0);
}
/** @return void */
public function handle_web() {
/** @phpstan-ignore-next-line */
if (self::DEBUG) {
Debug::enable();
}
Phar::webPhar('spip_loader.phar', null, null, ['svg' => 'image/svg+xml'], function ($incomming_path) {
$path = $incomming_path;
// Gestion des assets (spip_loader.php/?file=assets/...)
if (isset($_GET['file'])) {
$path = '/' . ltrim($_GET['file'], '/');
}
if (!$path) {
$path = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '';
}
if (!$path) {
$path = (string) substr(
parse_url(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '', PHP_URL_PATH),
strlen($_SERVER['PHP_SELF'])
);
}
Debug::add('incomming path', $incomming_path);
Debug::add('calculated path', $path);
$extension = pathinfo($path, \PATHINFO_EXTENSION);
if (in_array($extension, ['css', 'js', 'jpg', 'png', 'ico', 'svg'])) {
# Éviter Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR (http/2)
# https://serverfault.com/questions/844526/apache-2-4-7-ignores-response-header-content-encoding-identity-instead-respect
header('Content-Encoding: none');
header('Expires: ' . \date('r', time() + 86400 * 7));
}
if ($extension && $extension !== 'php') {
return '/public' . $path;
}
if ($path === '') {
return '/index.php';
}
return false;
});
}
/**
* @param \Throwable $e
* @return void
*/
public static function show_on_debug($e) {
/** @phpstan-ignore-next-line */
if (!self::DEBUG) {
throw $e;
}
/** @phpstan-ignore-next-line */
echo $e->getMessage() . ' on file ' . $e->getFile() . ' on line ' . $e->getLine();
}
/** @return bool */
private function is_opcache_enabled() {
return function_exists('opcache_get_status')
&& @opcache_get_status()
&& (@opcache_get_status()['opcache_enabled']);
}
/**
* Simple route `spip_loader.php?{route}`
* @param string $route
* @return bool
*/
private function is_route($route) {
return !empty($_SERVER['QUERY_STRING']) && ($_SERVER['QUERY_STRING'] === $route);
}
}
try {
$stub = new Stub();
$stub->init();
$stub->handle();
} catch (\Exception $e) {
// @note use \Throwable when PHP 7+
Stub::show_on_debug($e);
/** @phpstan-ignore-next-line */
} catch (\Error $e) {
Stub::show_on_debug($e);
}
__HALT_COMPILER(); ?>
i; � spip_loader.phar index.php, ���e, -%[1� lang/tradloader_ca.php3 ���eO ��� lang/tradloader_eu.php� ���e
ؕ>� lang/tradloader_wa.php� ���e� *��� lang/tradloader_eo.php� ���e� J�� lang/tradloader_fa.php� ���e ��Sl� lang/tradloader_ru.phpA ���e $k�� lang/tradloader_de.php ���e� Fra� lang/tradloader_sk.php� ���e" �zN� lang/tradloader_br.php� ���ek ���f� lang/tradloader_en.php� ���e� �l2� lang/tradloader_ar.phpw ���e� P��� lang/tradloader_oc_lnc.php; ���e^ Rk� lang/tradloader_nl.php� ���e� �� lang/tradloader_ro.php� ���e� v=l� lang/tradloader_nap.phpf ���e� �t��� lang/tradloader_cs.php� ���e� 4�g� lang/tradloader_es.php� ���e� �
� lang/tradloader_tr.php8 ���e� �p�Ϥ lang/tradloader_hr.php� ���e` �\�:� lang/tradloader_km.php, ���e� ��he� lang/tradloader_pt_br.php� ���e� g�!Ϥ lang/tradloader_oc_ni.phpA ���eZ Ѣ�9� lang/tradloader_it.php" ���e �]�� lang/tradloader_gl.php! ���ek (O�&� lang/tradloader_ast.php ���eU ��� lang/tradloader_zh_tw.phpJ ���e
�t� lang/tradloader_sv.php8 ���eU ���� lang/tradloader_lb.php ���et /�R� lang/tradloader_fr.php
���e
�Hq�� lang/tradloader_fr_tu.phpg ���e� ��!�� lang/tradloader_id.php� ���e5 �8�ߤ
src/Debug.php� ���e� �{� src/Route/Debug.php� ���eI wl�� src/Route/AbstractRoute.php� ���e� Gp� src/Route/ArchiveDownload.phpx ���e� ��� src/Route/RouteInterface.php� ���e� ��q� src/Route/ArchiveSelection.php" ���e� 5�}� src/Route/ArchiveClean.php ���e% �:� src/Route/SelfUpdate.php ���e� ���(� src/Route/ArchiveDecompress.php� ���e9 �:� src/Session.php( ���e� ��m�� ( src/Iterator/SuperflusFilterIterator.php� ���e J,ܤ src/Check/Authentication.php� ���e ��� src/Check/Filesystem.php� ���e% 2��K� src/Check/CheckInterface.php� ���e� �t��� src/Spip.php� ���e ��2� src/Deprecations.php� ���e �7}v� src/Template/Error.php. ���eB (��� src/Template/Utils.php6 ���e� g��E� src/Template/Page.php� ���e/ E�0� src/Template/Template.php� ���e ��~� src/Cleaner.php[ ���e" �@D6� src/Api/Versions.php� ���e� Q4�� src/Api/V2.php� ���e� ǩ��� src/Application.php\ ���e� 2�3� src/Remote.phpo ���e� ��oϤ src/Filesystem.php� ���e� ���� src/Config/Config.php� ���e� �;a�� src/Config/ConfigInterface.php� ���ej �>5�� src/Config/Custom.php_ ���e" 5 � src/Config/Internal.phpF ���e; ^Z�C� src/Config/AbstractConfig.phpY ���ec ���� src/I18n/Languages.php� ���e; h暤 src/I18n/Translator.php� ���e� s� src/Http/Response.phpb ���eF ��Ĥ src/Http/RequestInterface.php� ���ep � �|� src/Http/ResponseInterface.php_ ���eV ]ͷ� src/Http/Request.php� ���eY �I�Ҥ public/index.php. ���e� H09Τ ) vendor/symfony/polyfill-intl-idn/Info.php� ���e� �[�� ( vendor/symfony/polyfill-intl-idn/Idn.phpB ���e� ԃ�I� . vendor/symfony/polyfill-intl-idn/bootstrap.phpP ���e? �㐿� M vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php� ���e� ;qf� L vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php> ���e� NچG� >