Skip to content

Commit

Permalink
Merged branch 'w31-MDL-28412_m22_iconv' of git://github.com/skodak/mo…
Browse files Browse the repository at this point in the history
…odle.git with english string improvements
  • Loading branch information
Sam Hemelryk committed Aug 8, 2011
2 parents 3b85026 + 695940d commit 7d85a4e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@
die;
}

// make sure iconv is available and actually works
if (!function_exists('iconv')) {
// this should not happen, this must be very borked install
echo 'Moodle requires the iconv PHP extension. Please install or enable the iconv extension.';
die();
}
if (iconv('UTF-8', 'UTF-8//IGNORE', 'abc') !== 'abc') {
// known to be broken in mid-2011 MAMP installations
echo 'Broken iconv PHP extension detected, installation/upgrade can not continue.';
die;
}

define('NO_OUTPUT_BUFFERING', true);

require('../config.php');
Expand Down
12 changes: 12 additions & 0 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@
die;
}

// make sure iconv is available and actually works
if (!function_exists('iconv')) {
// this should not happen, this must be very borked install
echo 'Moodle requires the iconv PHP extension. Please install or enable the iconv extension.';
die();
}
if (iconv('UTF-8', 'UTF-8//IGNORE', 'abc') !== 'abc') {
// known to be broken in mid-2011 MAMP installations
echo 'Broken iconv PHP extension detected, installation can not continue.';
die;
}

if (PHP_INT_SIZE > 4) {
// most probably 64bit PHP - we need a lot more memory
$minrequiredmemory = '70M';
Expand Down

0 comments on commit 7d85a4e

Please sign in to comment.