We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12241
    • 80 Posts
    Before smiley undecided sad embarrassed huh After

    phpthumbof is playing games with me... actually, we haven’t even started yet, I’m unable to get it to generate thumbnails, the ’src’ attributes are blank. I’m getting an error from phpthumbof. I’ve done this before with Revolution but lately things haven’t been working for me and I don’t know why, maybe someone good person out there can take a moment and help before I gouge my eyeballs out.

    Using a chunk as getResources template:
    <img src="[[+content:phpthumbof=`w=436&h=298&zc=1`]]" alt="[[+pagetitle]]" title="[[+description]]"/>
    


    Error in modx error log:
     [2011-03-07 23:39:31] (ERROR @ /modx/connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: /Applications/MAMP/htdocs/modx/core/cache/phpthumb/phpThumb_cache_localhost_src76f73bd2d1b4a55a556d4f3d938540cc_parc31a15effecece6739931a21fc05dd5b_dat1299558474.jpeg
    
      Environment:
      modx: rev 2.0.8-pl
      localhost: Apache/2.0.63 (Unix) PHP/5.2.11 DAV/2, MySQL client version: 5.1.37
      • 33968
      • 863 Posts
      Hey, did you manage to sort this one out?

      I haven’t tried phpThumbOf but been using phpThumb successfully using this technique. I’ve found it more efficient and it generates static urls to images instead of those long messy dynamic ones output by phpThumb.
        • 12241
        • 80 Posts
        No I haven’t been able to. Apparently the new version of phpthumbof (version 1.1.0-pl) addresses the incorrect file paths, unfortunately I’m still having that same problem despite using the most current version. It’s happening on my localhost & my production server.

        Your link looks great, I’ll try it out and let you know. Thanks so much for your help.

        *oh yeah, the good folks here at modx have warned that phpThumb has a major security vulnerability... oh well, at this point I don’t care, I just want my thumbnails hahaha
          Environment:
          modx: rev 2.0.8-pl
          localhost: Apache/2.0.63 (Unix) PHP/5.2.11 DAV/2, MySQL client version: 5.1.37
          • 12241
          • 80 Posts
          I haven’t tried phpThumbOf but been using phpThumb successfully using this technique. I’ve found it more efficient and it generates static urls to images instead of those long messy dynamic ones output by phpThumb

          Yes! Thank you, thank you thank you. Finally got my thumbnails working AND the URL’s are beautiful SEO style. I’m so happy, as soon as I get this fully integrated I will do a special river dance to celebrate smiley
            Environment:
            modx: rev 2.0.8-pl
            localhost: Apache/2.0.63 (Unix) PHP/5.2.11 DAV/2, MySQL client version: 5.1.37
            • 33968
            • 863 Posts
            I think I might have done a little dance as well grin

            Although now I’m a bit worried about that security issue. Just been onto the phpThumb website and there hasn’t been a new release in 3 years...
              • 12241
              • 80 Posts
              The solution you provided has the preset thumbnail sizes so it sorta secures the phpthumb smiley I’m not sure how well but maybe someone else could tell us?
                Environment:
                modx: rev 2.0.8-pl
                localhost: Apache/2.0.63 (Unix) PHP/5.2.11 DAV/2, MySQL client version: 5.1.37
                • 33968
                • 863 Posts
                It doesn’t matter if the urls are static or not - as long as the phpthumb.php file is somewhere on your server, someone could find it and run it. Although in our case it’s not obvious that we are using phpThumb to generate the thumbnails. Better safe than sorry though smiley

                There’s a patch here: http://modxcms.com/forums/index.php/topic,54874.msg316279.html#msg316279

                Damn nuisance hackers!
                  • 12241
                  • 80 Posts
                  Thanks lucas, phpthumb is patched
                    Environment:
                    modx: rev 2.0.8-pl
                    localhost: Apache/2.0.63 (Unix) PHP/5.2.11 DAV/2, MySQL client version: 5.1.37