WordPress.org

Ready to get started?Download WordPress

Forums

wp_mkdir_p not working (3 posts)

  1. ti2m
    Member
    Posted 1 year ago #

    Hi,
    I've written the plugin Edge Suite which handles animations in form of OAM files, which are nothing else then ZIPs. I'm using the codex method wp_mkdir_p to create nested directory structures. Turns out some people have problems with it as it just fails. Any clue why that might be? It's really strange, this really common functionality is only being called 4 times in wp core, almost looks like devs know it doesn't work....

    Am happy about any hints, as I can't reproduce the errors on my servers and it's therefore really hard to debug it.

  2. bcworkz
    Member
    Posted 1 year ago #

    The word "attempt" appears frequently on that page :)

    I suspect various permission schemes implemented by admins or hosts will sometimes stymie this function. About all you can do is fail gracefully when false is returned.

  3. ti2m
    Member
    Posted 1 year ago #

    I forgot to mention, that mk_dir and chmod work when using them on none nested folders somewhere in the code as I'm creating basic plugin folders that way.

    As far as I can tell the essential part of the recursion is based on mk_dir and chmod, which work for themselfs, therefore I don't get where and why it fails.

Topic Closed

This topic has been closed to new replies.

About this Topic