Solved

Wordpress > Uploading image > Invalid method in request

Posted on 2010-08-22
6
908 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
  • 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Wordpress Horizontal Drop-Down Menu In this tutorial I will show you had to add a WordPress horizontal navigation menu to your theme. I have searched and searched for a good tutorial on creating a WordPress nav menu without adding a plug-in or us…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

816 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now