Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #28921

    Gilaad A
    Participant

    Hi guys. thanks for the ongoing support

    I ran my first site on localhost and it was WP 3.6.1. I uploaded it via FTP and it’s all perfect: socialimpacthub.org

    Ive just done a new localhost install with the latest version 3.8.1. and everything is running well, but I have this issue on my pages…I get the following warnings once I activate X theme/childtheme.

    Warning: scandir(/Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/themes/x): failed to open dir: Permission denied in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/class-wp-theme.php on line 993

    Warning: scandir(): (errno 13): Permission denied in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/class-wp-theme.php on line 993

    Warning: Invalid argument supplied for foreach() in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/class-wp-theme.php on line 996

    I have looked around but i have no idea how to fix it. Ive looked on wordpress forums etc. It doesnt happen with other themes/plugins. So i suspect it is an issue with X.

    Please let me know what you think?
    Thanks!

    PS. Here is the code for that section, from line 969 to 1010

    /**
    * Scans a directory for files of a certain extension.
    *
    * @since 3.4.0
    * @access private
    *
    * @param string $path Absolute path to search.
    * @param mixed Array of extensions to find, string of a single extension, or null for all extensions.
    * @param int $depth How deep to search for files. Optional, defaults to a flat scan (0 depth). -1 depth is infinite.
    * @param string $relative_path The basename of the absolute path. Used to control the returned path
    * for the found files, particularly when this function recurses to lower depths.
    */
    private static function scandir( $path, $extensions = null, $depth = 0, $relative_path = ” ) {
    if ( ! is_dir( $path ) )
    return false;

    if ( $extensions ) {
    $extensions = (array) $extensions;
    $_extensions = implode( ‘|’, $extensions );
    }

    $relative_path = trailingslashit( $relative_path );
    if ( ‘/’ == $relative_path )
    $relative_path = ”;

    $results = scandir( $path );
    $files = array();

    foreach ( $results as $result ) {
    if ( ‘.’ == $result[0] )
    continue;
    if ( is_dir( $path . ‘/’ . $result ) ) {
    if ( ! $depth || ‘CVS’ == $result )
    continue;
    $found = self::scandir( $path . ‘/’ . $result, $extensions, $depth – 1 , $relative_path . $result );
    $files = array_merge_recursive( $files, $found );
    } elseif ( ! $extensions || preg_match( ‘~\.(‘ . $_extensions . ‘)$~’, $result ) ) {
    $files[ $relative_path . $result ] = $path . ‘/’ . $result;
    }
    }

    return $files;
    }

    #29209

    Alexander
    Keymaster

    Hi Gilaad,

    These permission errors mean your file and folder permissions are not allowing WordPress to detect plugins, themes, and other files correctly.

    I’d advise reviewing this article to ensure your permissions are configured correctly:

    http://codex.wordpress.org/Changing_File_Permissions

    #29615

    Gilaad A
    Participant

    Hi guys
    Ive changed all my folders and files to allow reading and writing (im on a mac) EG right click > get info > scroll to bottom > change permissions to:

    Gilmacbook(me) – Read and write
    Staff – Read and write
    Everyone – Read and write

    This has gotten rid of most of the issues I had with getting to this point, such as “unable to create directory” etc.

    Strangely, I’ve just reverted to the Normal X theme and it gets rid of the problem. Is there something I’m doing wrong with the child theme that is the problem? This is my file structure (in a photo) http://picpaste.com/screenshot.jpg_copy-0J1wio2n.jpg

    The top window is the old install, the bottom is the new one. It appears I have done everything the same. but i didnt have this error with the Renew theme.

    I’m losing my miiiiinndddd
    Thanks!

    #29713

    Support
    Member

    Hi!

    I suggest that you create a fresh install of wordpress using the latest version then add the x theme and x child theme only. There are a lot of other themes on the themes folder, though they’re not causing the issue, I thought creating a fresh install with only the x theme installed will clear things up a bit.

    Cheers!