• I’m a very basic novice so I’m not sure if this is something simple that was just fixed in the new WordPress and no one is talking about it any more or what. Does anyone have any suggestions on the below two errors. I can’t even get this plugin to begin to work.

    Warning: mkdir() [function.mkdir]: Permission denied in /home2/guysford/public_html/wp-content/plugins/user-photo/user-photo.php on line 409

    Warning: Cannot modify header information – headers already sent by (output started at /home2/guysford/public_html/wp-content/plugins/user-photo/user-photo.php:409) in /home2/guysford/public_html/wp-includes/pluggable.php on line 694

Viewing 12 replies - 31 through 42 (of 42 total)
  • 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?

    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.

    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] => https://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.

    @jamie Birch
    Yes, I have

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

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

    @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.

    @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=\"https://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?

    @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.

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

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

    Nice work connected888 that solution worked for me in WP 2.7

    @connected888

    Thanks, your solution worked for me ??

Viewing 12 replies - 31 through 42 (of 42 total)
  • The topic ‘[Plugin: User Photo] 2 Warnings with WP 2.5 Permission error & Header error’ is closed to new replies.