Recent Topics

1 Jan 07, 2012 05:44    

My b2evolution Version: 3.x

I had a blog running on an older version 2.4.x and suddenly one day when I went to write a blog I got the error message "The blog's media directory «media» could not be created, because the parent directory is not writable or does not exist." Rather strange considering I had been using the blog for a couple of years without a problem. I decided that some files must have become corrupted so I decided to upgrade to version 3.3.3. The upgrade went smoothly. However, the error message still exists and I am unable to upload files through the file manager. I can still insert files from the file manager, the browse view is fine. However, I can not upload files. I can edit the properties of a file. I can ftp files up to the server but I would like to do it with the file upload section. The upload window will not even come up.

Now, the media directory <media> certainly does exists and the write permission are correct on that folder. It does not need to create a media folder as it already exists unless that is just a generic response to the problem. Either this is from a file that did not get changed when upgrading or something else.

Could this be a problem in the database that got corrupted before I upgraded and it just got carried over?

At this time I just need some ideas and pointers on where to go to resolve this issue.

2 Jan 07, 2012 19:19

		// TODO: use a File object here (to access perms, ..) when FileCache::get_by_path() is provided.
		if( $create && ! is_dir( $mediadir ) )
		{
			// TODO: Link to some help page(s) with errors!
			if( ! is_writable( dirname($mediadir) ) )
			{ // add error
				if( is_admin_page() )
				{
					$Messages->add( sprintf( T_("The blog's media directory &laquo;%s&raquo; could not be created, because the parent directory is not writable or does not exist."), rel_path_to_base($mediadir) )
								.get_manual_link('media_file_permission_errors'), 'error' );
				}
				return false;

That is the section that is returning the error. OK, this part "because the parent directory is not writable or does not exist", what is the parent directory it is looking for? I have it set to use the default setting for the media location which is blog a (/blogs/media/blogs/a) I even changed the mode on the folders to 775. It was working and just stopped working.

3 Jan 08, 2012 07:37

OK, I decided to create a new folder and just do a fresh install of b2evolution 3.3.3 on a new blank database. Install went fine. Log into the backend and went to files and it had no error message and I was able to click on upload and upload to my user folder. I did not set up a blog because I need my old blog. I dumped the database from the upgrade since it should have the proper table structure. I then imported that database dump into the new database, removing the old.

When to files and got the error message again, upload form will not appear. So, this is NOT a permissions problem. So it must be looking for some folder or the error is somewhere else. It is clear it is a setting in the database that is preventing the file manager from loading properly.

So, someone please direct me to where in the database this problem might exist.

4 Jan 08, 2012 19:05

I seemed to have resolved this problem. I decided to see if I could just set up a new installation and just copy the table for my blog articles (items) into the new installation to retrieve my posts. Therefore, I decided to delete two unused blogs, one was a link blog, or aggregator blog. After deleting those two blogs the error message with the file manager went away. Apparently it was some setting; perhaps the media location setting got corrupted in the database somehow; this just up and happened one day. I think I will go back to the original old 2.4.x blog and see if I can repair it and then back up that database and blog and archive it.

Hopefully this will be of some help to someone else in the future. I did not even think to check the unused blog settings to see if they were causing the problem. The file manager was probably checking across all blogs media directory when it loads. I am sure that there use to be people here that would have known this and could have told me to check the settings in all blogs. The problem is that the ones that use to come here and help have moved on.


Form is loading...