We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15083
    • 697 Posts
    Hi guys,

    Just moved to a staging enviornment and am getting some weird behaviour from the MODx Browser.
    CentOS, Apache
    PHP 5.3
    Revolution 2.1.3pl

    Problem:
    phpthumb only generates a thumbnail for images that are .png
    jpgs and gifs all show as blank.

    Example call to phpthumb:
    PNG that works:
    /connectors/system/phpthumb.php?src=wallpapers%2Fmypng.png&w=80&h=60&f=jpg&q=90&HTTP_MODAUTH=xxx&wctx=mgr&basePath=%2Fdump%2Fimages%2F&basePathRelative=0&baseUrl=&baseUrlRelative=1

    JPG than does not work:
    /connectors/system/phpthumb.php?src=wallpapers%2Fmyjpg.jpg&w=80&h=60&f=jpg&q=90&HTTP_MODAUTH=xxx&wctx=mgr&basePath=%2Fdump%2Fimages%2F&basePathRelative=0&baseUrl=&baseUrlRelative=1

    Anyone seen anything like this before.
    Both files have the same ownership permissions, it just FAILS for jpg and gif!?!?!

    Thanks in advance for the help.

    J



      • 15083
      • 697 Posts
      Guys this looks like a core bug?
      In the file:
      modphpthumb.class.php the cache is setup as follows:
      $cachePath = $this->modx->getOption('core_path',null,MODX_CORE_PATH).'cache/phpthumb/';

      This assumes that the cache is off the MODX_CORE_PATH.
      In my case this is not ture, and I would imagine this is the case for many people.

      This setting should look at the cache path set in the config.inc.php??
      Will I raise a bug?
        • 15083
        • 697 Posts
        This was/is not a bug.
        It is possible to setup GD library withour jpg support, this was what happened in my case smiley