We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25801
    • 6 Posts
    JoZ3 : Apparently this is because phpthumb has a security flaw, so it’s been deactivated for non-registered users.
    This is the reason why you’ve got to use a server script (php) to read that file.
    You may use fopen(path_to_image)… which is exactly what phpThumbOf does.

    I actually got to fix the problem with phpThumbOf. The path was incorrect. If you look at the logs (core/cache/logs/error.log) after loading a page that has a phpthumbof call, what do you see ?
    If you read something like "cannot fopen file" it probably means the path is incorrect or simply that your permissions are wrong (chmod to at least 755). Look at the path the log gives you and then correct it on the phpthumbof snippet.

    Hope this helps.
      • 9550
      • 123 Posts
      I’m also having the same problem with phpthumbof: nothing is being output but the original text link. I just posted my error log here:

      http://modxcms.com/forums/index.php/topic,62995.0.html

      I’m definitely getting a bunch of file errors in that massive log. Lots of locations seem a bit F’ed up like

      /Users/ojs/Sites/rawc2//rawc2/assets/images/exhibitions/nicholas frenette/01NFEntryToPurgatory.jpg

      not sure why it’s got the second /rawc2 in there.

      any ideas?
        • 25801
        • 6 Posts
        featherodd : Thats exactly the same problem I had. Changing server did the trick ! embarrassed
        Did someone find out where phpThumbOf creates that path in the snippet ? Didn’t have much time to check it out.
          • 9550
          • 123 Posts
          changing server?!? that’s the solution? ideally i’d like to continue developing on my localhost.. I could, I guess, change the this site to be set as root and reconfigure it for the new address. that’s seems a bit retarded.... is there no simple fix for this well reported and easily reproducible problem of running phpthumbof on a modx install running inside a subdirectory?
            • 12241
            • 80 Posts
            is there no simple fix for this well reported and easily reproducible problem of running phpthumbof on a modx install running inside a subdirectory?

            NOT YET ... But since so many of us are having this problem I’m sure Shawn is working on it, maybe we all buy him a beer once it’s fixed 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
              Don’t know if you guys have discovered this already but you can fix this by editing the phpthumb class file. See here:
              http://modxcms.com/forums/index.php/topic,63182.msg358026.html#msg358026

              Apparently come Revo 2.1 this will be easily sorted via system settings, but until then you can fix it manually.
                • 9550
                • 123 Posts
                according to JoZ3, the issue may still persist after employing the fix from MadeMyDay.

                great to hear this is fixed with 2.1 smiley
                • I am running REVO 2.2 and phpthumbof 1.3.2 and have had massive problems getting it to work... I constantly get the wrong path sent to it:
                  [39] => GetImageSize(/kunden/352327_80637/webseiten/modx//modx/assets/web/allgemein/IMG_0779.jpg) FAILED with error "" in file "phpthumb.class.php" on line 1318

                  The site is on a subfolder called "modx" and the path writes it twice. Is this a bug or a settings problem that I need to know about?
                    Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
                  • I tried to fix it using the tip here, but still no change:
                    http://forums.modx.com/index.php/topic,63182.msg358026.html#msg358026
                      Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
                      • 15877
                      • 55 Posts
                      I have just spent a fairly long time trying to make phpthumbof work in a MODx instance installed locally on a subdirectory before finding out that pThumb did the same job with the same syntax... and actually worked.

                      I saw from gitHub that phpThumbOf was officially deprecated and no longer maintained.

                      It would be nice to remove it from the repository as well as from rtfm.modx.com to prevent others from running into the same problems.