• Warning: is_file() [function.is-file]: open_basedir restriction in effect. File(/tr.js) is not within the allowed path(s): (/var/www/vhosts/b******.com/httpdocs:/tmp) in /var/www/vhosts/b******.com/httpdocs/wp-admin/includes/post.php on line 1187

    Warning: is_file() [function.is-file]: open_basedir restriction in effect. File(/tr_dlg.js) is not within the allowed path(s): (/var/www/vhosts/b******.com/httpdocs:/tmp) in /var/www/vhosts/b******.com/httpdocs/wp-admin/includes/post.php on line 1190

    Warning: is_file() [function.is-file]: open_basedir restriction in effect. File(/en.js) is not within the allowed path(s): (/var/www/vhosts/b******/httpdocs:/tmp) in /var/www/vhosts/b******.com/httpdocs/wp-admin/includes/post.php on line 1194

    Warning: is_file() [function.is-file]: open_basedir restriction in effect. File(/en_dlg.js) is not within the allowed path(s): (/var/www/vhosts/b******.com/httpdocs:/tmp) in /var/www/vhosts/b******.com/httpdocs/wp-admin/includes/post.php on line 1199

Viewing 5 replies - 1 through 5 (of 5 total)
  • Is this without plugins?

    I have got this problem too.
    I think this problem happens from tinymce-advanced.3.2 because when I disable this plugin, I haven’t found this problem.

    Please help me to fix this problem.

    Moderator Dion Hulse

    (@dd32)

    Meta Developer

    A little late i know, But i just took a look at that code.. Seems its probably realpath() breaking on that system.

    In wp-admin/includes/post.php you’ll find this: (at about line 1190)

    if ( function_exists('realpath') )
    						$path = trailingslashit( realpath($path) );

    Just remove those 2 lines and see if that fixes it, I suspect it will..

    dd32 commenting out those lines instantly solved the problem.

    THANK YOU for your suggestion/solution! I am in your debt.

    So, since this is a core file I’m editing I suspect the issue will (may?) return with the next new codeset?

    Mad Max

    (@mad_max)

    To resolve issue about php warning with realpath(), you have to test if a path exists before apply realpath() to it. So, for example, edit yourWPblogpath/wp-admin/includes/post.php, at line 1263 and substitute this

    if ( function_exists('realpath') )
      $path = trailingslashit( realpath($path) );

    with

    if ( function_exists('realpath') )
      if (file_exists($path)) {
        $path = trailingslashit( realpath($path) );
      } else {
        $path = "";
      }

    Obviously, this patch has to be applied on all others core files using realpath() function this way, i.e.
    wp-admin/includes/class-ftp.php
    wp-admin/load-styles.php
    wp-admin/load-scripts.php

    This “bug” is due to the inclusion of the Hardened-PHP Project’s Suhosin Patch in many distributions of PHP (version > 5.2.3) by default (Ubuntu Hardy 8.04 for example).
    This patch replaces PHPs realpath function with the BSD implementation, which ignores the last path component.

    The workaround is to use the file_exists function to verify that the file exists before using realpath to get its real path string.

    Joomla! soffers of the same bug also and the patch was not included
    yet, even in the actual 1.5.15 version.
    Hope WordPress developer take care of this quickly.

    [Explanation taken from
    https://www.php.net/manual/en/function.realpath.php#82770
    https://www.hardened-php.net/suhosin/a_feature_list:realpath.html
    ]

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘2.7 post and edit error’ is closed to new replies.