We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36562
    • 94 Posts
    No that one is broken too. I suppose you mean me setting a tv to image, add it to a template, and then go it to a resource using that template, go to tv panel and click the img selectbox, then select the "broken image" and then the thumbnail that should be displayed under the select box.. Is broken too:/
      --------------------------------------
      www.williamastrom.se
      • 36562
      • 94 Posts
      The path to it is:
      /connectors/system/phpthumb.php?h=150&w=150&src=rorelseakademin.jpg&source=4

      ( the image may not be the one i used earlier as an example, but they are all in the same folder )
        --------------------------------------
        www.williamastrom.se
        • 36562
        • 94 Posts
        I saw you had helped on the phpthumb repo.. If you would have the time, i could hand you my login and password to the site. Cause im getting frustraded with this and i have a large important project coming up soon that this has to work for.) But i do have this problem on all my sites on this host.... thats why thought of imagemagick..
          --------------------------------------
          www.williamastrom.se
        • Quote from: DesignByWilliam at Apr 24, 2013, 07:20 PM
          I saw you had helped on the phpthumb repo.. If you would have the time, i could hand you my login and password to the site.

          Sure, if you PM me that if you'd like; I'll try to take a look this evening.
          Do any of your sites on this host create thumbnails under any circumstances? I'm still trying to figure out if it's an issue with media sources and paths, or with thumbnail generation itself.

          Maybe this is a good test for it. Come up with a link to an image you know is there. For example: [yoursite]/assets/theme/images/background2.png You can visit that URL with your browser and see an image, right?

          Now how about
          [yoursite]/connectors/system/phpthumb.php?src=assets%2Ftheme%2Fimages%2Fbackground2.png&w=100&h=80&f=png&q=10&far=1&HTTP_MODAUTH=modx516e77de4a2e50.41909954_15177940e2f83f6.10346557&wctx=mgr"

          Do you see a thumbnail of the previous image, or what happens?

          If both work, then it's an issue with paths.
            Extras :: pThumbResizerimageSlimsetPlaceholders
          • Also check the paths for $modx_assets_path and $modx_assets_url in core/config/config.inc.php and make sure those are right for your server.

            They should look something like:
            $modx_assets_path= '/path_to_home_directory/web_root_directory/assets/';
            $modx_assets_url= '/assets/';

            The parts with underscores will be specific to your server of course.


            Also check your error log. There might be some useful diagnostic information there. [ed. note: jgrant last edited this post 11 years ago.]
              Extras :: pThumbResizerimageSlimsetPlaceholders
              • 36562
              • 94 Posts
              http://www.williamastrom.se/connectors/system/phpthumb.php?src=assets%252Ftheme%252Fimages%252Fbackground2.png&w=100&h=80&f=png&q=10&far=1&HTTP_MODAUTH=modx516e77de4a2e50.41909954_15177940e2f83f6.10346557&wctx=mgr

              Gives a false and 401.

              The asset path works.

              The paths in config file are correct.

              I seem to have these errors:
              [2013-04-24 12:09:54] (ERROR @ /connectors/system/phpthumb.php) Error outputting thumbnail:
              OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 557
              [2013-04-24 12:09:54] (ERROR @ /connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: /storage/content/26/100126/williamastrom.se/public_html/core/cache/phpthumb/phpThumb_cache_www.williamastrom.se_src08274a367a0808f4b1581f276c822d0a_par02a1b054e8467fb1e234c8a8fd8d10d2_dat0.png



                --------------------------------------
                www.williamastrom.se
              • I took a look at your site. The problem definitely seems to be with thumbnail creation. The case isn't solved, but I do have a some suspects smiley

                In phpinfo(), under the Core section, you'll see there's a very long list of disable_functions. These are all php functions that your server won't allow. Probably for security reasons, though most hosts don't disable anything. Amongst the looong list you'll find these 4: system, shell_exec, exec, passthru. phpThumb will use any of these 4 to run the ImageMagick 'convert' command, but in this case it doesn't have any available way to run the command. So even though ImageMagick is installed, phpThumb can't use it.

                This is where things get strange though. phpthumbof (a wrapper for phpThumb) works fine! I set up a test page so you can see exactly what it's doing.
                But when the same phpThumb is called via a connector (i.e. thumbnails in the manager), you get a 500 error almost all of the time. Though, a couple times I actually saw a thumbnail pop up in the file browser (?!?). Also core/cache/phpthumb/ does have images in it, though it's possible you uploaded these when you transferred the site from your local environment to the server; I don't have FTP access and can't check the file times to make sure.

                I have no idea why that is. Possibly the server error log—different from the MODX Error Log—has some more clues. My guess is that it's caused by some (security) setting on the server. As a side note, it appears this server may be running modSecurity: I noticed I was unable to save a resource when it had particular content in it.
                Also several times I had this odd thing happen: I'd successfully save something, go back and look at it, and see the old version. Disable the browser cache, navigate somewhere else, come back, still the old version. Then logout or switch browsers, login, check the file again, and this time it's the new version. Strange...

                I'll stop rambling here, but the short of it is, this host seems to have some odd settings, likely the cause of the thumbnails problem. If they have good tech support you might be able to figure it out together with a sysadmin. However, I'd seriously think about switching hosts if that's a possibility; you'll save yourself a lot of frustration!
                  Extras :: pThumbResizerimageSlimsetPlaceholders
                • I have no idea why phpThumb works when called by phpthumbof, but not connectors/system/phpthumb.php; it's mystifying. I think that connector ends up loading core/model/modx/processors/system/phpthumb.class.php, but both that and phpthumbof end up at core/model/phpthumb/phpthumb.class.php. I don't know why one way would work and the other wouldn't.
                    Extras :: pThumbResizerimageSlimsetPlaceholders
                    • 36562
                    • 94 Posts
                    Strange. I just messed around at a clients site now. Same server.. There 30% of images has thumbnails showing.
                      --------------------------------------
                      www.williamastrom.se
                      • 36562
                      • 94 Posts
                      According to my host shell_exec, exec, system or has to be passthru has to be allowed, and they wont turn it on out of security reasons. Is there anything i can do or must i leave my host?
                        --------------------------------------
                        www.williamastrom.se