Jump to content

Uploading images to WordPress -> Errors!


andreasb

Recommended Posts

I've just installed WordPress on my free 000WebHost account.

But now I got a problem!

You see, I wanted to include pictures in my posts, but it seems like the server is giving me some errors:

BpPs77Qc.jpeg

 

I've already created the uploads folder, and chmodded it to both 777 and 775, but none of them works.

 

LINE 1933:

function wp_mkdir_p( $target ) {
// from php.net/mkdir user contributed notes
$target = str_replace( '//', '/', $target );
if ( file_exists( $target ) )     <-- LINE 1933
	return @is_dir( $target );

 

LINE 1942:

	// Attempting to create the directory may clutter up our display.
if ( @mkdir( $target ) ) {
	$stat = @stat( dirname( $target ) );
	$dir_perms = $stat['mode'] & 0007777;  // Get the permission bits.
	@chmod( $target, $dir_perms );
	return true;
} elseif ( is_dir( dirname( $target ) ) ) {   <-- LINE 1942
		return false;
}

 

What's wrong with the script, or the server?

Link to comment
Share on other sites

  • 2 weeks later...

For some reason its trying to open / which you dont have access to.. It might be worth looking in the wp_options table in your database and the wp_config.php file and looking to see where the file upload path has been set to. You need to change this to /home/your_user_name/public_html/wp-content/uploads and then hopefully you wont have this issue :)

Link to comment
Share on other sites

This may or may not be of use but I had an issue where wordpress couldn't find the correct image directory. Here's what I done:

 

I ensured that I had an '/images' folder in my main directory as well as the templates directory. Each folder should have a copy of the images you're experiencing trouble with. By process of elimination (alternating between deletion of folders) I was able to deduce how wordpress was behaving.

 

The following might prove useful for shortening you're paths:

<?php echo bloginfo('template_directory') ?>

 

:-*

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.