phpThumb v1.7.7-200612252156
Using phpthumb.php
My system has open_basedir restrictions ON (set to site's folder only) and when using the latest phpThumb release, phpthumb.php does the following:
- instantiate a phpThumb class
- load the config file
- set variables in phpThumb instance
The problem stands at line 219 of phpthumb.class.php:
$this->config_temp_directory = realpath($this->config_temp_directory ? $this->config_temp_directory : (getenv('TMPDIR') ? getenv('TMPDIR') : getenv('TMP')));
As no default config_temp_directory has been set in the class file (phpthumb.class.php), the code will try to get the TMPDIR or TMP path, which outputs a nice warning when open_basedir restrictions are in effect.
Possible problem resolution:
Don't set the config_temp_directory at class construction but only when necessary (phpThumb_tempnam() and setCacheDirectory()).
Indeed, if using phpthumb.php, the config_temp_directory variable will be set and there will be no need to check for TMPDIR or TMP environment variables.
Logged In: YES
user_id=429434
Originator: NO
Implemented as suggested in v1.7.8-200707120837
Please try the latest beta version:
http://phpthumb.sourceforge.net/phpThumb.zip
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).