WordPress.org

Forums

TubePress
realpath(): open_basedir restriction in effect. File(/tmp) is not writable (3 posts)

  1. Samuel Aguilera
    Member
    Posted 2 years ago #

    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/

  2. Eric
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  3. Samuel Aguilera
    Member
    Posted 2 years ago #

    You're welcome! ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic