| 1 |
<?php |
<?php |
| 2 |
// $Id: imageapi_gd.install,v 1.8 2008/08/01 18:52:22 dopry Exp $ |
// $Id: imageapi_gd.install,v 1.9 2009/03/11 05:42:47 drewish Exp $ |
| 3 |
|
|
| 4 |
function imageapi_gd_requirements($phase) { |
function imageapi_gd_requirements($phase) { |
| 5 |
$requirements = array(); |
$requirements = array(); |
| 57 |
); |
); |
| 58 |
} |
} |
| 59 |
|
|
| 60 |
|
// Test the 'memory_limit' PHP configuration directive |
| 61 |
$memory_limit = ini_get('memory_limit'); |
$memory_limit = ini_get('memory_limit'); |
| 62 |
|
|
| 63 |
if (parse_size($memory_limit) < parse_size('96M')) { |
// If $memory_limit contains a value of -1, the PHP runtime |
| 64 |
|
// doesn't impose a limit on memory used by PHP scripts |
| 65 |
|
if ($memory_limit && $memory_limit != -1 && parse_size($memory_limit) < parse_size('96M')) { |
| 66 |
$requirements['imagecache_memory_limit'] = array( |
$requirements['imagecache_memory_limit'] = array( |
| 67 |
'title' => $t('ImageAPI GD Memory Limit'), |
'title' => $t('ImageAPI GD Memory Limit'), |
| 68 |
'value' => $memory_limit, |
'value' => $memory_limit, |