?
Solved

Wordpress > Uploading image > Invalid method in request

Posted on 2010-08-22
6
Medium Priority
?
914 Views
Last Modified: 2012-05-10
Using IE7 gives the code 7da15513b0758 and using FF3.6 give the code 20495798211440.

Searching Google points this to a SSL issue but this is a new install of Wordpress, no SSL in use here!  We're on CentOS5.4 with Apache 2.2.  This is a dedicated server.

[Mon Aug 23 01:19:29 2010] [error] [client 127.0.0.0] Invalid method in request -----------------------------7da15513b0758
[Mon Aug 23 01:20:22 2010] [error] [client 127.0.0.0] Invalid method in request -----------------------------20495798211440

Open in new window

0
Comment
Question by:Geoff Millikan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 3

Expert Comment

by:ZenArcher
ID: 33501393
Sometimes the error messages are misleading.

I believe that either a WordPress core file is corrupted, or -- more likely --  a directory permission is incorrect. Check the location of the upload directory is valid,
see,
http://codex.wordpress.org/Settings_Media_SubPanel

(for WordPress <3.x, see the "Miscellaneous" Subpanel)
http://codex.wordpress.org/Settings_Miscellaneous_SubPanel

Also check permissions on the wp-content/uploads directory, try setting it to "755" or "777" and then attempt to upload again.

see also,
http://codex.wordpress.org/Changing_File_Permissions

Good luck!
0
 

Author Comment

by:Geoff Millikan
ID: 33502427
Here's the directories and permissions:

0755 /home/domain/www/
0777 /home/domain/www/wp-content/
0777 /home/domain/www/wp-content/uploads/

I've attached 3 things below: (1) the Apache error log and (2) the headers that the browser sent to web server and (3) the the screen shot from Wordpress.

Could it be that php.ini isn't allowing file uploads or something like that?


---== Apache Error log ==--
[Mon Aug 23 15:51:44 2010] [error] [client 71.0.0.0] Invalid method in request -----------------------------7da32a29b0758

---== Headers sent by Frirefox browser ==---
http://www.doamin.com/wp-admin/media-upload.php?inline=&upload-page-form=

POST /wp-admin/media-upload.php?inline=&upload-page-form= HTTP/1.1
Host: www.doamin.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://www.doamin.com/wp-admin/media-new.php
Cookie: wordpress_98b21f6068eab2dddd34dae82e505582=username%7C1281114101%7C80f5ebb00860c81a09eb77129188ebb0; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_98b21f6068eab2dddd34dae82e505582=username%7C1283734101%7Cf1d405e11113a8bb5e1984e3ded471c3; wp-settings-time-1=1282525398; wp-settings-1=uploader%3D1
Content-Type: multipart/form-data; boundary=---------------------------11742186154173
Content-Length: 126389
-----------------------------11742186154173
Content-Disposition: form-data; name="async-upload"; filename="1.jpg"
Content-Type: image/jpeg

ÿØÿà

Open in new window

ScreenShot012.png
0
 

Author Comment

by:Geoff Millikan
ID: 33502574
Well, changed my php.ini settings to allow file uploads but there's no improvement - same issue and error log.

http://mu.wordpress.org/forums/topic/14893
0
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 
LVL 3

Expert Comment

by:ZenArcher
ID: 33503387
OK. I would try using the plain "Browser uploader" instead of the Flash uploader.
Have you tried that one? Also, try using a different image, it may just be that your image is corrupted. (Try one that has been previously uploaded successfully.)

Also, you might want to give this a try:
http://wordpress.org/extend/plugins/image-upload-http-error-fix/
or just place the attached mod_security CODE into your root htaccess file

see this page for a full discussion of similar issues:
http://wordpress.org/support/topic/http-error-on-image-upload-still


<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

Open in new window

0
 

Author Comment

by:Geoff Millikan
ID: 33503505
> I would try using the plain "Browser uploader" instead of the Flash uploader.

Yep, tried that too.  Tried several different browser.  No love.

> Also, try using a different image, it may just be that your image is corrupted.

Tried a PDF, no love.

> Try one that has been previously uploaded successfully.

I haven't been able to upload anything successfully using Wordpress.

Per list below, we're not using mod_security, so no need to disable it.
# httpd -t -D DUMP_MODULES
[Mon Aug 23 17:49:39 2010] [warn] module php5_module is already loaded, skipping
Loaded Modules:
 core_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 include_module (shared)
 log_config_module (shared)
 env_module (shared)
 mime_module (shared)
 deflate_module (shared)
 headers_module (shared)
 setenvif_module (shared)
 autoindex_module (shared)
 negotiation_module (shared)
 dir_module (shared)
 alias_module (shared)
 rewrite_module (shared)
 proxy_module (shared)
 proxy_http_module (shared)
 proxy_connect_module (shared)
 cache_module (shared)
 cgi_module (shared)
 php5_module (shared)
 ssl_module (shared)
Syntax OK

Open in new window

0
 

Accepted Solution

by:
Geoff Millikan earned 0 total points
ID: 33523909
I found the issue!  For security reasons like avoiding slowloris attacks, we had set LimitRequestBody to a value of 10240 which prevents HTTP requests over 10240 bytes.  So we just altered this setting for the one location while keeping the server-wide setting like this:

[Below are sample contents of the httpd.conf file:]
#blah blah service-wide config settings
LimitRequestBody 10240
#blah blah more service-wide config settings
<VirtualHost *:80>
    ServerName      www.mydomain.com
          ServerAlias      mydomain.com
          ServerAdmin      abuse@mydomain.com
          <Directory "/home/mydomain/www/wp-admin">
                LimitRequestBody 6291456
                    AllowOverride None
          CustomLog       logs/access_log combined
          ErrorLog        logs/error_log
    </Directory>
</VirtualHost>

See this for more details:
http://httpd.apache.org/docs/current/mod/core.html#limitrequestbody
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

WordPress can be pretty daunting, especially for a beginner, so I thought it might be a good idea to write an article to show how easy it is to get started in WordPress and to design a custom theme.  The first step is to check with your hosting comp…
In Part I (http://www.experts-exchange.com/Web_Development/Blogs/WordPress/A_8410-Getting-Started-In-WordPress-Part-I.html), I introduced you to the powerful WordPress backend, the WordPress administrative Dashboard.  In Part II, I will introduce yo…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question