Support » Plugin: TubePress » 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.

    http://wordpress.org/extend/plugins/tubepress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Eric

    (@k2eric)

    Thanks for the report and for including your fix!

    The inability to set the cache directory is a known bug that will have a fix for version 3.0.1. This is the first I’ve heard of WP_TEMP_DIR or get_temp_dir() and I’ll look at including those in a future version.

    You’re welcome! 😉

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘realpath(): open_basedir restriction in effect. File(/tmp) is not writable’ is closed to new replies.