We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47850
    • 3 Posts
    Hello,
    following is about using phpThumbOf and MODX subdirectory installation. I think it fits quite well in here, otherwise please move.

    In several base installations of MODX in subdirectories like www.mydom.tld/de/ i have a problem that the path to the images which should be scaled is getting wrong. So scaling won't work and the images are shown in the original size.

    I use the following versions:
    - MODX Revolution 2.2.14-pl (traditional)
    - phpThumbOf 1.4.0

    And using a TV like: [[+tv.tv-myimage-thumb:phpthumbof=`w=300&h=200`]]

    The error log says:

    [jjjj-mm-dd hh:mm:ss] (ERROR @ /www/htdocs/mydirectory/de/core/model/phpthumb/phpthumb.class.php : 1403)
    PHP warning: getimagesize(/www/htdocs/mydirectory/de/de/assets/images/myimage.jpg) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory


    Obviously in each call in the script e.g. like "setCacheDirectory() ..." or "setting onfig_cache_directory ..." before line [20] the path (/www/htdocs/mydirectory/de/) is set correctly.

    Then in log line [20] (in my case) there is a wrong path to the image.
    One of the "de/" (exactly the name of the path/subdirectory of my installations) part is double.

    [20] => $this->sourceFilename set to "/www/htdocs/mydirectory/de/de/assets/images/myimage.jpg" in file "phpthumb.class.php" on line 852


    I saw that some other users have similar problems with the paths, but those solution could not help.

    For example: https://forums.modx.com/thread/72600/problems-with-imagetv-mediasource-and-phpthumbof-modx-2-2-rc2 or: https://forums.modx.com/?action=thread&thread=75040 or: https://forums.modx.com/forums/thread/78137/gallery-phpthumb-path-error#dis-post-430852

    My question is, is this a general known problem or has the installation in a subdirectory nothing to do with that?

    When i'm right it looks like that the path must be adjust manually, but the question is how. So is there any solution to fix this?

    If you need more information about the settings, let me know. Or if desired I can surely post the complete error log.

    Best Regards
      • 47850
      • 3 Posts
      A brief remark on my part. This is not a solution for the problem but now i have simply installed the manager in the root directory so that the mentioned problem above no longer occurs.