We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36582
    • 463 Posts
    It's easy to skip the settings as there are several pages of them - glad you got it sorted.
      Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
      • 43044
      • 9 Posts
      [23] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file

      No ImageMagick installed!


      • Make sure that the "assets/components/phpthumbof/cache" directory is created and is writable by PHP
      • Make sure you have ImageMagick installed and enabled on your PHP installation
      • If your host is using symlinks for its directory structure, make sure they point to the correct, true path in core/config/config.inc.php
        • 9241
        • 42 Posts
        I recently ran into a similar problem and found that the connector processor was causing the path problems for when adding the base path to the source.

        My problem was associated with the modx installation being put into a sub folder (base path: /usr/www/users/userX/projects/modx/ and base url: /projects/modx/). I'm running modx 2.3.3 and gallery 1.7.0.

        I found the problem in this file: /projects/modx/core/components/gallery/processors/web/phpthumb.php on line 69

        $src = str_replace(basename($basePath), '', $src);


        I found that if the website is in a sub folder the basename function only removes the last folder from the path rather than two or more which then also leaves two slashes and in my case part of the base url.

        So a thumbnail request like for the image /projects/modx/assets/gallery/1/image.jpg:

        http://www.domain.com/projects/modx/assets/components/gallery/connector.php?action=web/phpthumb&ctx=web&w=250&h=250&zc=1&far=C&q=90&src=%2Fprojects%2Fmodx%2Fassets%2Fgallery%2F1%2Fimage.jpg


        The processor then transforms the input source to:
        /usr/www/users/userX/projects/modx/projects//assets/gallery/1/image.jpg

        I replaced the above piece of code with the following:

        $baseUrl = $modx->getOption('base_url', null, MODX_BASE_URL);
        $src = str_replace($baseUrl, '', $src);
        


        This then caused the processor to strip more than one folder from the path including the slash "/".

        The resulting input source would them become:
        /usr/www/users/userX/projects/modx/assets/gallery/1/image.jpg

        Which is correct.

        I'm not sure if the code should be replaced in the gallery project's processor to perhaps to resolve future problems, because even if project is located in /projects/modx/projectA/modxWebsite/ then the base url will be /projects/modx/projectA/modxWebsite/ and it will remove it appropriately.

        Hope this helps.