Changeset 15575


Ignore:
Timestamp:
Jun 6, 2012, 5:38:56 PM (8 years ago)
Author:
patdenice
Message:

bug:2647
External ImageMagick does not work anymore on 1and1 servers

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/image.class.php

    r15551 r15575  
    510510    $this->imagickdir = $conf['ext_imagick_dir'];
    511511
     512    if (get_host() == 'kundenserver.de')  // 1and1
     513    {
     514      @putenv('MAGICK_THREAD_LIMIT=1');
     515    }
     516
    512517    $command = $this->imagickdir.'identify -format "%wx%h" "'.realpath($source_filepath).'"';
    513518    @exec($command, $returnarray);
  • trunk/include/functions.inc.php

    r15573 r15575  
    16931693  return $is_mobile_theme;
    16941694}
     1695
     1696/**
     1697 * return hostname with gethostbyaddr and keep it in database
     1698 */
     1699function get_host($force_update=false)
     1700{
     1701  global $conf;
     1702
     1703  if (!isset($conf['host']) or $force_update)
     1704  {
     1705    $conf['host'] = 'undefined';
     1706    if ($host = @gethostbyaddr($_SERVER['SERVER_ADDR']))
     1707    {
     1708      $conf['host'] = $host;
     1709    }
     1710    conf_update_param('host', $conf['host']);
     1711  }
     1712  return $conf['host'];
     1713}
    16951714?>
Note: See TracChangeset for help on using the changeset viewer.