Unable to upload services images.

Once I upload the image, nothing happen. Maybe is chmod permission problem. How to fix it?

  • Mason
    • DEV MAN’s Sidekick

    Hiya spyworld!

    First off, welcome to WPMU DEV! I see you've got the BlogsMU theme, but I'm assuming you're trying to upload a file through the default WordPress media library uploader. Is this correct?

    Also, can you tell me what version of WordPress you're using? Are you also using BuddyPress?

    We'll help you get it sorted. A good place to start is to disable all plugins (remove them from the directory or rename the folder temporarily) and see if the uploader works then. Also, if you're getting an error it'd be good if we knew what it was.

    A bit more info and I think we'll be able to help you track down a solution.

    Thanks! and again, welcome! :smiley:

  • drmike
    • DEV MAN’s Mascot

    Can you please check you're webserver's error logs to see what's in there if anything? That's actually a good first step and that information should be included in your first post when asking for help.

    Can you walk us through with some specifics as to what's occurring? Specifics including the name of the file, the size, etc.

    Is this occurring with all files that you upload or just a single one?

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    Your server error logs would be available through your server's admin area - not WordPress. Contact your host if you're not sure where to find this. It's a good thing to have access to as drmike mentioned, it's often a very insightful first step when trouble shooting. Thanks!

  • spyworld
    • WPMU DEV Initiate

    blogs-mu/_inc/functions/services-functions.php line 1290 until 1295:
    if($mu == "true") {
    if(!is_dir($upload_path_blogid)){
    mkdir($upload_path_blogid, 0777);
    chmod($upload_path_blogid, 0777);
    }
    }

    Unable to create directory. Please fix it.

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    This is most likely a chmod permission problem as you mentioned above. What is your permissions set for in 'wp-content' and 'blogs.dir'. Try changing them to 777 and see if that works. If not, can you try logging into your FTP and manually adding the directory?

    Also, verify that the apache mod_rewrite module is installed and enabled. Thanks!

  • spyworld
    • WPMU DEV Initiate

    Finally, I know how to fix it. This directory "blogs.dir" doesn't exist even you active multisite. In this particular, you must create manually.

    I suggest to add the script below:

    $upload_path = ABSPATH . 'wp-content/blogs.dir/';
    if($mu == "true") {
    if(!is_dir($upload_path)){
    mkdir($upload_path, 0777);
    chmod($upload_path, 0777);
    }
    }

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.