Skip to content

Commit

Permalink
Merge pull request box#66 from kormoc/issue-64
Browse files Browse the repository at this point in the history
Re box#64, verify php version in index.php before doing anything else. This...
  • Loading branch information
gtowey committed Dec 17, 2013
2 parents 6a60331 + 1715978 commit 5ec15d1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
* @license Apache 2.0 license. See LICENSE document for more info
**/

// Ensure we're on php 5.3 or newer
if (strnatcmp(phpversion(), '5.3') < 0) {
print "Anemometer requires PHP 5.3 or newer. You have ".phpversion();
die();
}

if (!function_exists('bcadd')) {
print "Anemometer requires the BCMath extension";
die();
}

set_include_path( get_include_path() . PATH_SEPARATOR . "./lib");
require "Helpers.php";
require "Anemometer.php";
Expand Down

0 comments on commit 5ec15d1

Please sign in to comment.