Browse Source

Check for common setup pitfalls

Fixes #25 and fixes #26
spaghetti 8 years ago
parent
commit
ea6fa76434
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      classes/script_start.php

+ 6
- 1
classes/script_start.php View File

10
 /*------------------------------------------------------*/
10
 /*------------------------------------------------------*/
11
 /********************************************************/
11
 /********************************************************/
12
 require 'config.php'; //The config contains all site wide configuration information
12
 require 'config.php'; //The config contains all site wide configuration information
13
-//Deal with dumbasses
13
+
14
+// Check for common setup pitfalls
15
+if (!ini_get('short_open_tag')) { die('short_open_tag must be On in php.ini'); }
16
+if (!extension_loaded('apcu')) { die('APCu extension not loaded'); }
17
+
18
+// Deal with dumbasses
14
 if (isset($_REQUEST['info_hash']) && isset($_REQUEST['peer_id'])) {
19
 if (isset($_REQUEST['info_hash']) && isset($_REQUEST['peer_id'])) {
15
   die('d14:failure reason40:Invalid .torrent, try downloading again.e');
20
   die('d14:failure reason40:Invalid .torrent, try downloading again.e');
16
 }
21
 }

Loading…
Cancel
Save