0

I am unable to import BlogML.XML in my word press blog. It giving the following error after creating .htaccess ->

The uploaded file could not be moved to /htdocs/blog.myblog.com/wp-content/uploads/2010/12.

The following are the content of my .htaccess file-->

php_value upload_max_filesize 40M

php_value post_max_size 40M

php_value max_execution_time 2000

php_value max_input_time 2000

Kappa
  • 1,015
  • 1
  • 16
  • 31
vanurag
  • 297
  • 2
  • 19

1 Answers1

1

I would say that there is a permission issue with the uploads folder. Can you upload any file (like an image) using the Media Library? If not, you have to fix the permissions (most probably the group of the upload folder).

To set the correct permissions, connect to your sevrer through SSH, navigate to the wp-content folder and use the following commands:

chgrp GROUP_NAME_OF_APACHE_SERVER -R .
chmod g+w -R .

That should fix the upload issue.

2ndkauboy
  • 9,302
  • 3
  • 31
  • 65
  • Yeah u r right..I am not able to upload even a image using media upload..how to set permission? – vanurag Dec 21 '10 at 12:25
  • Ok..But now I am getting the following error...Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 12 bytes) in /htdocs/blog.myblog.com/wp-content/plugins/blogml-importer/XPath.class.php on line 1887 – vanurag Dec 21 '10 at 12:44
  • Than you have to set the php_value memory_limit to a higher value. Check your configuration using the phpinfo() function and try to find a good value. You might want to double the value for a first try. My installation has a limit of 64M. – 2ndkauboy Dec 21 '10 at 12:51
  • pls guide me the path where i have to change the things...is it under phpmyadmin folder? – vanurag Dec 21 '10 at 12:55
  • No, just do it as you have done with the other php_values in your .htaccess file. – 2ndkauboy Dec 21 '10 at 13:07
  • Its not working...I have added in wp-config.php file: define(‘WP_MEMORY_LIMIT’, ’128M’); and in my .htaccess file: php_value memory_limit 128M – vanurag Dec 21 '10 at 13:39
  • and now it is giving this error Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 40 bytes) in //htdocs/blog.myblog.com/wp-content/plugins/blogml-importer/XPath.class.php on line 1698 – vanurag Dec 21 '10 at 13:44
  • Could it be that the plugins sets the memory_limit value itself? Beside a .htaccess you might try to include a php.ini file into your folder to overwrite the memory_limit value. Or you might increase the value in the system wide php.ini file. – 2ndkauboy Dec 21 '10 at 13:58
  • i have added php.ini in my blog root folder and changed the memory_limit from 8M 32M..but not working..pls guide – vanurag Dec 21 '10 at 14:47
  • Can you check the setting of the "master" and "local" value with a phpinfo() function call in the same directory. You can than also see where your main php.ini file is located. Ah and don't forget to restart your apache as otherwise your changes in the main php.ini will have no effect. – 2ndkauboy Dec 21 '10 at 15:10
  • I think by looking into these is wasting of time as am not able to do te right thing as per ur expectation. So wat I am doing is to breaking up my xml file into small pieces and uploading it one by one....and this is working.... – vanurag Dec 21 '10 at 15:19