WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: User Photo] 2 Warnings with WP 2.5 Permission error & Header error (43 posts)

  1. Weston Ruter
    Member
    Posted 5 years ago #

    @Jamie Birch:
    I think you need to chmod 777 that directory you created; that's why it's giving you "permission denied". But it looks like the "upload path" is not correctly stored in WordPress. Try setting it again in Settings > Misc > Upload Directory

  2. Jamie Birch
    Member
    Posted 5 years ago #

    Thanks, I just checked and it is all 777 - I'm having trouble understanding exactly what the correct path should be exactly. I'm using WP 2.5 is that a problem?

  3. Weston Ruter
    Member
    Posted 5 years ago #

    I just released a new version of User Photo (version 0.9.2). This will include a more helpful error message when "mkdir" fails. Specifically, it will include the return value of the wp_upload_dir() function. I think that sometimes WordPress returns invalid values with this function, so if this is the case, this updated error message will show just what exactly it's returning. User Photo gets the "basedir" item of the returned array and appends "/userphoto", so if the basedir is empty, then User Photo will fail. This appears to be what is happening.

  4. connected888
    Member
    Posted 5 years ago #

    Thanks weston, that's helped me find the prob for my install. Solution might help others.

    wp_upload_dir() returned:
    Array ( [path] => /home/mydomain/public_html/press/wp-content/uploads [url] => http://mydomain.com/press/wp-content/uploads [subdir] => [error] => )

    basedir was evidently not returned by the wp_upload_dir() for my wordpress install.

    I edited the plugin's user-photo.php file to replace 3 instances of 'basedir' with 'path' and 2 instances of 'baseurl' with 'url'

    Now uploading and photo display are working for the plugin on my install.

  5. mafiamoso
    Member
    Posted 5 years ago #

    @Jamie Birch
    Yes, I have

  6. mafiamoso
    Member
    Posted 5 years ago #

    [path] => .../wp-content/uploads
    [url] => http://mydomain.com/wp-content/uploads
    [subdir] =>
    [error] =>

    I have empty subdir. My upload folder is wp-content/uploads

  7. mafiamoso
    Member
    Posted 5 years ago #

    @connected888

    I did what you told. I can upload now. But it seems that it upload an empty photo. The file is created (with the right file name, e.g. me.jpg). But it is empty file.

  8. 12a3.vn
    Member
    Posted 5 years ago #

    @mafiamoso

    You should creat a new folder in wp-content/uploads, named userphoto, then move all uploaded file to this new folder. Then you can see the uploaded image and its thumbnail in User edit or your profile setting panel.

    @all
    I try to use this code in my template:

    <?php if(userphoto_exists($user))
    userphoto($user);
    else
    echo "<img
    src=\"http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536\" width=\"32\" height=\"32\"/>";
    ?>

    to display the avatar (user's photo) but it don't work. But it works with last version of this plugin. What is the matter?

  9. mafiamoso
    Member
    Posted 5 years ago #

    @12a3.vn

    Like i said before, the photos seem to be uploaded ( in the userphoto folder), but the file is empty. Only the filename is created.

  10. 12a3.vn
    Member
    Posted 5 years ago #

    @mafiamoso
    I suggest using the previous version. The newest contains some unknown bugs.

  11. susanohnj
    Member
    Posted 5 years ago #

    Thank you so much for the feedback! :) It works!! All I had to do was install the newest version and Wha la:)

  12. steamfrog
    Member
    Posted 5 years ago #

    Nice work connected888 that solution worked for me in WP 2.7

  13. proque
    Member
    Posted 5 years ago #

    @connected888

    Thanks, your solution worked for me :)

Topic Closed

This topic has been closed to new replies.

About this Topic