Changeset 15576


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

merge r15575 from trunk to branch 23
bug:2647
External ImageMagick does not work anymore on 1and1 servers

Location:
branches/2.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/admin/include/image.class.php

    r12757 r15576  
    421421    $this->imagickdir = $imagickdir;
    422422
     423    if (get_host() == 'kundenserver.de')  // 1and1
     424    {
     425      @putenv('MAGICK_THREAD_LIMIT=1');
     426    }
     427
    423428    $command = $imagickdir.'identify -format "%wx%h" "'.realpath($source_filepath).'"';
    424429    @exec($command, $returnarray);
  • branches/2.3/include/functions.inc.php

    r12871 r15576  
    16501650  return implode('.', array_slice(explode('.', $version), 0, 2));
    16511651}
     1652
     1653/**
     1654 * return hostname with gethostbyaddr and keep it in database
     1655 */
     1656function get_host($force_update=false)
     1657{
     1658  global $conf;
     1659
     1660  if (!isset($conf['host']) or $force_update)
     1661  {
     1662    $conf['host'] = 'undefined';
     1663    if ($host = @gethostbyaddr($_SERVER['SERVER_ADDR']))
     1664    {
     1665      $conf['host'] = $host;
     1666    }
     1667    conf_update_param('host', $conf['host']);
     1668  }
     1669  return $conf['host'];
     1670}
    16521671?>
Note: See TracChangeset for help on using the changeset viewer.