realpath(): open_basedir restriction in effect. File(/tmp) is not writable
-
Hi!
Tubepress is causing a huge amount of warnings in error logs due to a bad handle of tmp directory for cache.
PHP Warning: realpath(): open_basedir restriction in effect. File(/tmp) is not writable
The above warning happens when Tubepress is running in a server where PHP can’t access to system /tmp due to open_basedir restriction.
Tubepress has a setting for this, but seems it’s not working (tried it and not working).
Anyway, Tubepress should check not only for the general system tmp directory, but for WP_TEMP_DIR too and other possible values (lik PHP upload_tmp_dir).
The problem is on this file:
tubepress/vendor/ehough/fimble/src/main/php/ehough/fimble/impl/StandardFilesystem.php on line 36
To fix this problem you can change lines from 34 to 37 to look like this
if (function_exists('get_temp_dir')) { return realpath( get_temp_dir() ); }
That change replaces standard PHP function sys_get_temp_dir for WordPress function get_temp_dir, that takes care about all stated above…
I hope the author can include this fix for the next version.
- The topic ‘realpath(): open_basedir restriction in effect. File(/tmp) is not writable’ is closed to new replies.