aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2016-09-04 23:57:21 +0200
committerArthurHoaro <arthur@hoa.ro>2016-11-05 14:29:52 +0100
commit004a6855fda7bd487d7c4bd58b9e12561f07ad39 (patch)
tree8ffcd0c3d58fc753a3fed48009c1ea798f13cb15 /index.php
parent0f634cafcf0e1374522a6fa9d59c5ff9a7ebb016 (diff)
downloadShaarli-004a6855fda7bd487d7c4bd58b9e12561f07ad39.tar.gz
Shaarli-004a6855fda7bd487d7c4bd58b9e12561f07ad39.tar.zst
Shaarli-004a6855fda7bd487d7c4bd58b9e12561f07ad39.zip
composer: display an error message if the autoload script is missing
Closes https://github.com/shaarli/Shaarli/issues/645 Relates to https://github.com/shaarli/Shaarli/issues/607 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'index.php')
-rw-r--r--index.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/index.php b/index.php
index 1f148d78..c6f86c59 100644
--- a/index.php
+++ b/index.php
@@ -45,6 +45,16 @@ error_reporting(E_ALL^E_WARNING);
45 45
46 46
47// 3rd-party libraries 47// 3rd-party libraries
48if (! file_exists(__DIR__ . '/vendor/autoload.php')) {
49 header('Content-Type: text/plain; charset=utf-8');
50 echo "Error: missing Composer configuration\n\n"
51 ."If you installed Shaarli through Git or using the development branch,\n"
52 ."please refer to the installation documentation to install PHP"
53 ." dependencies using Composer:\n"
54 ."- https://github.com/shaarli/Shaarli/wiki/Server-requirements\n"
55 ."- https://github.com/shaarli/Shaarli/wiki/Download-and-Installation";
56 exit;
57}
48require_once 'inc/rain.tpl.class.php'; 58require_once 'inc/rain.tpl.class.php';
49require_once __DIR__ . '/vendor/autoload.php'; 59require_once __DIR__ . '/vendor/autoload.php';
50 60