symphonycms/jit_image_manipulation — comment on commit 728adf15c9db31f2453baca6b6888cb318fb956f
File:  line 0
By davidhund:

Although I agree that the revert is probably a good idea I just ran into an [issue](http://symphony-cms.com/discuss/thread/32795/5/#position-98) similar to the one Kanduvisla is referring to.

My problem is that, on a new host, `sys_get_temp_dir()` returns `/tmp` while PHP's temporary folder (`upload_tmp_dir `) is configured as `/public/tmp`. On this shared host access to `/tmp` by the PHP process is not allowed.

So, for some reason `sys_get_temp_dir()` returns an incorrect path preventing JIT to write the temp image files.
This is [an issue that pops up more](https://encrypted.google.com/search?hl=en&q=sys_get_temp_dir()%20different%20from%20upload_tmp_dir), it seems...

It seems `sys_get_temp_dir()` does not always respect `$upload_tmp_dir` so would a better work around not be to check for `ini_get('upload_tmp_dir');` and use *that* before falling back to `sys_get_temp_dir()`?