We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31912 MODX Staff
    • 95 Posts
    I moved a site that was in development onto a server so that the client can populate the site. Currently the domain name is on a shared hosting plan and has the username alias (http://sheridan.liquidweb.com/~clientname/) while the client transfers content into the site – is it possible that the ~ is preventing phpThumb from generating thumbnails?

    I created another fresh install to make sure it wasn’t an issue with a path in the config and had the same issue. I downloaded phpThumb and did the default demo that comes with the package and it seems to generate the images fine. The server has GD 2.0.34 installed and is running on php 5.2.13

    I deleted the phpthumb folder in the core/cache – the folder is regenerated but does not have any subfolders.

    I am lost on what else to check, any suggestions or ideas?
      • 31912 MODX Staff
      • 95 Posts
      I am having this same issue with another site at the temporary URL – confirming that it is likely because of the ~ in the URL. Is there anyway to fix this so that the client can see the image thumbnails during the process of populating the site? Here is the error in the error log:

      [2010-08-26 17:11:20] (ERROR @ /~clientname/connectors/system/phpthumb.php) Error outputting thumbnail:
      OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 557
      [2010-08-26 17:11:21] (ERROR @ /~clientname/connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: /home/clientname/public_html/core/cache/phpthumb/phpThumb_cache_www.blohmcreative.com_srcdd53711951e1fbf6673362a4184b02dd_par3c9237f62bc13d2d6cb6907137a1fa72_dat1280454391.jpeg

      Thanks!
        • 17723
        • 221 Posts
        Hello Waldus,

        Did You found the solution ?

        I’m having the same problem ...

        Luke
          Lucas from AroundCyprus.net
          • 31912 MODX Staff
          • 95 Posts
          Hey Luke,

          My issue, in both cases, was tied to the aliased name in the URL as I suspected – /~clientname/. I had the client point beta.theirurl.com and it fixed the issue.

          I figured this is more of an issue with ImageMagick and not Revolution, but if any of the developers read this and that’s not the case, let me know and I will file a ticket in Jira.

          -Dustin
            • 42393
            • 143 Posts
            Just to keep everything in the same place, I just got this related error:


            [2012-12-31 13:58:19] (ERROR @ /connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: /home/zzzzzzz/core/cache/phpthumb/phpThumb_cache_zzzzzzzz_srcf8857..0cd_par...e4_dat13..52.png
            [2012-12-31 13:58:19] (ERROR @ /connectors/system/phpthumb.php) Error outputting thumbnail:
            OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 557

            I'm not using a tilde anywhere. This isn't a production site and I just have a few pages. I think something in the Manager generated this, maybe when I went to view package info.
              Loved ModX when I was using it a few years ago. Shifted to WordPress, sorry. Thanks, all.
              • 10208 ☆ A M B ☆
              • 1,780 Posts
              Getting the exact same error myself in a Cloud dev site (image TV's aren't working at this site). I don't know what I was doing when it happened. Will watch closer now.

              Oh, and also a ton of these:
              [2012-12-31 16:35:25] (ERROR @ /index.php) `id` is not a valid integer and may not be passed to makeUrl()

              and

              [2012-12-31 14:28:57] (ERROR in xPDOConnection::connect @ /paas/c0440/www/core/xpdo/xpdo.class.php : 2999) SQLSTATE[08004] [1040] Too many connections
              [2012-12-31 14:28:57] (ERROR @ /manager/index.php) Error preparing statement for query: SELECT `modSnippet`.`id` AS `modSnippet_id`, `modSnippet`.`source` AS `modSnippet_source`, `modSnippet`.`property_preprocess` AS `modSnippet_property_preprocess`, `modSnippet`.`name` AS `modSnippet_name`, `modSnippet`.`description` AS `modSnippet_description`, `modSnippet`.`editor_type` AS `modSnippet_editor_type`, `modSnippet`.`category` AS `modSnippet_category`, `modSnippet`.`cache_type` AS `modSnippet_cache_type`, `modSnippet`.`snippet` AS `modSnippet_snippet`, `modSnippet`.`locked` AS `modSnippet_locked`, `modSnippet`.`properties` AS `modSnippet_properties`, `modSnippet`.`moduleguid` AS `modSnippet_moduleguid`, `modSnippet`.`static` AS `modSnippet_static`, `modSnippet`.`static_file` AS `modSnippet_static_file` FROM `modx_site_snippets` AS `modSnippet` WHERE `modSnippet`.`name` = ? -
                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • 42393
                • 143 Posts
                The errors I reported above stopped occurring not long after reporting. But today I added a number of images to the site and now the error log has a slew of them again. Maybe the clue is here:
                ...phpthumb.php ...OutputThumbnail() failed because !is_resource($this->gdimg_output) on line 557
                OK, so "something" is not a resource. I don't have any of my images set as resources, didn't think it was necessary.

                Is that any clue about what's happening?

                Thanks.
                  Loved ModX when I was using it a few years ago. Shifted to WordPress, sorry. Thanks, all.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Resources are stuff that the browser can request; this includes MODx resources, but also .js, .css, image, and any other files. Hence URL - Universal Resource Locator. That's why MODx started referring to what we used to call "documents" as "resources".

                  It's possible with the sudden influx of a lot of images to process, or perhaps one excessively large image, phpthumb is running out of memory, and not properly generating the image files to be written.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org