We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8489
    • 90 Posts
    Hello,

    I’ve got a problem with phpthumbof, I have installed Revo in a subfolder called "modx".
    Now there a multiple errors like this one:

    [21] => SetCacheFilename() _src set from md5($this->sourceFilename) "/domains/mysite.eu/DEFAULT/modx//modx/images/Afbeelding 029.jpg" = "919dca849414adfb5cee23e7e76d1c38" in file "phpthumb.class.php" on line 3074

    I’am almost sure the errors are a result of the double subfolder "/modx//modx/" is this a bug or a wrong configuration in the manager?

    filemanager_path & _url are untouched as from instalation

    MODx Revolution 2.0.8-pl (traditional)
    PHP: 5.3.5-0.dotdeb.0
    MySQL: 5.0.87-d10-ourdelta65-log
      • 28215
      • 4,149 Posts
      1. Whats your MODX_BASE_PATH and MODX_BASE_URL set to in the core/config/config.inc.php? (dont paste the file here)
      2. You don’t happen to have a Setting named "phpthumbof.assets_path" set do you?
      3. Does this only happen with images with spaces in their name, or all images?
      4. Can you paste all the errors related to this in your error log?
      5. Can you paste your phpthumbof call?
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 8489
        • 90 Posts
        1. $modx_base_path= ’/domains/mysite.eu/DEFAULT/modx/’; $modx_base_url= ’/modx/’;
        2. No I left all the settings as they where with the installation, and did not created new ones.
        3. On all images, with or without spaces
        4. The error log is attached
        5.[[+tv.foto1:phpthumbof=`w=200&h=100`]]

        Thanks for helping out!!!
          • 17883
          • 1,039 Posts
          What I recently discovered: If you change this line in core/model/phpthumb/phpthumb.class.php
          $AbsoluteFilename = $this->config_document_root.dirname(@$_SERVER['PHP_SELF']).DIRECTORY_SEPARATOR.$filename;


          (around line 1030)

          in

          $AbsoluteFilename = $this->config_document_root.$filename;


          everything works again. Debugged this over 2 hours but cannot tell you why this happens.
            • 28215
            • 4,149 Posts
            You might also look into the phpthumb_document_root setting, which you might have to set manually.
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
              • 8489
              • 90 Posts
              MadeMyDay You made my day! It works perfect now!
                • 8489
                • 90 Posts
                Quote from: splittingred at Apr 07, 2011, 08:30 AM

                You might also look into the phpthumb_document_root setting, which you might have to set manually.

                Ok I will try that, but where can I find that setting I can’t find it in the Manager or in phpthumb.class.php
                  • 28215
                  • 4,149 Posts
                  Hm, forgot, sorry - that setting is in 2.1. Well, you’ll be able to set it come 2.1-pl. smiley
                    shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                    • 8489
                    • 90 Posts
                    Ok will try it when 2.1 pl comes out, Thanks!
                      • 9550
                      • 123 Posts
                      MadeMyDay: dude you’re a genius! just tried your fix on a fresh install and phpthumbof is now correctly generating thumbnails!! Amazing. How the heck did you figure that out? smiley