We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24865
    • 289 Posts
    We just migrated a local copy of MODX 2.2.1-pl to a newly installed dedicated server with PHP 5.4.1 installed, and we're getting phpThumb/reference errors all over the place. Most of it was caused by one simple error in one of our own classes, but now phpThumb won't function due to some E_STRICT warning. Yes, phpThumb is deprecated and old as hell, but it still should work in these new environments. Here's the error.

    Strict Standards: Non-static method phpthumb_functions::SafeExec() should not be called statically, assuming $this from incompatible context in /path/core/model/phpthumb/phpthumb.class.php on line 1082
    
    Strict Standards: Non-static method phpthumb_functions::FunctionIsDisabled() should not be called statically, assuming $this from incompatible context in /path/core/model/phpthumb/phpthumb.functions.php on line 448
    
    Strict Standards: Non-static method phpthumb_functions::FunctionIsDisabled() should not be called statically, assuming $this from incompatible context in /path/core/model/phpthumb/phpthumb.functions.php on line 448
    
    Strict Standards: Non-static method phpthumb_functions::FunctionIsDisabled() should not be called statically, assuming $this from incompatible context in /path/core/model/phpthumb/phpthumb.functions.php on line 448
    
    Strict Standards: Non-static method phpthumb_functions::FunctionIsDisabled() should not be called statically, assuming $this from incompatible context in /path/core/model/phpthumb/phpthumb.functions.php on line 448
    
    Strict Standards: Non-static method phpthumb_functions::CaseInsensitiveInArray() should not be called statically, assuming $this from incompatible context in /path/core/model/phpthumb/phpthumb.class.php on line 893
    
    Strict Standards: Non-static method phpthumb_functions::CaseInsensitiveInArray() should not be called statically, assuming $this from incompatible context in /path/core/model/phpthumb/phpthumb.class.php on line 900
    
    Strict Standards: Non-static method phpthumb_functions::ParseURLbetter() should not be called statically, assuming $this from incompatible context in /path/core/model/phpthumb/modphpthumb.class.php on line 140
    
    Strict Standards: Non-static method phpthumb_functions::ImageTypeToMIMEtype() should not be called statically, assuming $this from incompatible context in /path/core/model/phpthumb/modphpthumb.class.php on line 179


    So, obviously we've replaced the path by /path/ for security reasons, but this is a simple (or not) phpThumb error. We've also tried updating to the latest MODX version, but this didn't do the trick as well.

    Anybody else running a succesful 2.2> installation with 5.4>? Our local Direct Admin is running 5.2 and on that version it was stable and it worked perfectly.

    Naturally, we can set error_reporting(0), but not getting ANY errors while in development is just stupid. ;-)
      @MarkGHErnst

      Developer at Adwise Internetmarketing, the Netherlands.
      • 17403 ☆ A M B ☆
      • 183 Posts
      Same here. PHPThumb seem to odd :-(

      Strict Standards: Non-static method phpthumb_functions::CaseInsensitiveInArray() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 893
      
      Strict Standards: Non-static method phpthumb_functions::CaseInsensitiveInArray() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 900
      
      Strict Standards: Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 1217
      
      Strict Standards: Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 1234
      
      Strict Standards: Non-static method phpthumb_functions::OneOfThese() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 2887
      
      Strict Standards: Non-static method phpthumb_functions::OneOfThese() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 2888
      
      Strict Standards: Non-static method phpthumb_functions::version_compare_replacement() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 2935
      
      Strict Standards: Non-static method phpthumb_functions::version_compare_replacement() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 2946
      
      Strict Standards: Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 1217
      
      Strict Standards: Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 1234
      
      Strict Standards: Non-static method phpthumb_functions::nonempty_min() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 2819
      
      Strict Standards: Non-static method phpthumb_functions::nonempty_min() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 2820
      
      Strict Standards: Non-static method phpthumb_functions::ImageCreateFunction() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 2845
      
      Strict Standards: Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.functions.php on line 363
      
      Strict Standards: Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 2850
      
      Strict Standards: Non-static method phpthumb_functions::ImageColorAllocateAlphaSafe() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 2853
      
      Strict Standards: Non-static method phpthumb_functions::version_compare_replacement() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.functions.php on line 224
      
      Strict Standards: Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 3844
      
      Strict Standards: Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 2675
      
      Strict Standards: Non-static method phpthumb_functions::EnsureDirectoryExists() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\modphpthumb.class.php on line 101
      
      Strict Standards: Non-static method phpthumb_functions::GetAllFilesInSubfolders() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\phpthumb.class.php on line 658
      
      Strict Standards: Non-static method phpthumb_functions::ParseURLbetter() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\modphpthumb.class.php on line 141
      
      Warning: Cannot modify header information - headers already sent by (output started at path_to_modx\core\model\phpthumb\phpthumb.class.php:2853) in path_to_modx\core\model\phpthumb\modphpthumb.class.php on line 172
      
      Strict Standards: Non-static method phpthumb_functions::ImageTypeToMIMEtype() should not be called statically, assuming $this from incompatible context in path_to_modx\core\model\phpthumb\modphpthumb.class.php on line 180
      [ed. note: lokamaya last edited this post 14 years, 4 months ago.]
        zaenal.lokamaya
        • 17403 ☆ A M B ☆
        • 183 Posts
        Found the bug fix in the tracker http://tracker.modx.com/issues/7796
          zaenal.lokamaya
          • 24865
          • 289 Posts
          Thanks for the reply lokamaya! smiley
            @MarkGHErnst

            Developer at Adwise Internetmarketing, the Netherlands.
            • 28215
            • 4,149 Posts
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com