Die Meldung darin:
- Code: Select all
[16-Apr-2017 01:02:10 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/kd29314/public_html/wp-includes/functions.php on line 1613
Zeil 1613 aus der functions.php:
- Code: Select all
while ( '.' != $target_parent && ! is_dir( $target_parent ) ) {
Kontext:
- Code: Select all
function wp_get_raw_referer() {
if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) {
return wp_unslash( $_REQUEST['_wp_http_referer'] );
} else if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) {
return wp_unslash( $_SERVER['HTTP_REFERER'] );
}
return false;
}
/**
* Retrieve original referer that was posted, if it exists.
*
* @since 2.0.4
*
* @return string|false False if no original referer or original referer if set.
*/
function wp_get_original_referer() {
if ( ! empty( $_REQUEST['_wp_original_http_referer'] ) && function_exists( 'wp_validate_redirect' ) )
return wp_validate_redirect( wp_unslash( $_REQUEST['_wp_original_http_referer'] ), false );
return false;
}
/**
* Recursive directory creation based on full path.
*
* Will attempt to set permissions on folders.
*
* @since 2.0.1
*
* @param string $target Full path to attempt to create.
* @return bool Whether the path was created. True if path already exists.
*/
function wp_mkdir_p( $target ) {
$wrapper = null;
// Strip the protocol.
if ( wp_is_stream( $target ) ) {
list( $wrapper, $target ) = explode( '://', $target, 2 );
}
// From php.net/mkdir user contributed notes.
$target = str_replace( '//', '/', $target );
// Put the wrapper back on the target.
if ( $wrapper !== null ) {
$target = $wrapper . '://' . $target;
}
/*
* Safe mode fails with a trailing slash under certain PHP versions.
* Use rtrim() instead of untrailingslashit to avoid formatting.php dependency.
*/
$target = rtrim($target, '/');
if ( empty($target) )
$target = '/';
if ( file_exists( $target ) )
return @is_dir( $target );
// We need to find the permissions of the parent folder that exists and inherit that.
$target_parent = dirname( $target );
while ( '.' != $target_parent && ! is_dir( $target_parent ) ) {
$target_parent = dirname( $target_parent );
}
// Get the permission bits.
if ( $stat = @stat( $target_parent ) ) {
$dir_perms = $stat['mode'] & 0007777;
} else {
$dir_perms = 0777;
}
if ( @mkdir( $target, $dir_perms, true ) ) {
/*
* If a umask is set that modifies $dir_perms, we'll have to re-set
* the $dir_perms correctly with chmod()
*/
if ( $dir_perms != ( $dir_perms & ~umask() ) ) {
$folder_parts = explode( '/', substr( $target, strlen( $target_parent ) + 1 ) );
for ( $i = 1, $c = count( $folder_parts ); $i <= $c; $i++ ) {
@chmod( $target_parent . '/' . implode( '/', array_slice( $folder_parts, 0, $i ) ), $dir_perms );
}
}
return true;
}
return false;
}
/**
* Test if a give filesystem path is absolute.
*
* For example, '/foo/bar', or 'c:\windows'.
*
* @since 2.5.0
*
* @param string $path File path.
* @return bool True if path is absolute, false is not absolute.
*/
Wie bekomme ich heraus welche Datei das Problem ist?