Opened 14 years ago
Closed 14 years ago
#13685 closed defect (bug) (worksforme)
Media library uploads fail on first upload
Reported by: | Owned by: | ||
---|---|---|---|
Milestone: | Priority: | high | |
Severity: | blocker | Version: | 3.0 |
Component: | General | Keywords: | iis-support reporter-feedback |
Focuses: | Cc: |
Description
When using IIS7 on Windows 2008 R2, WP3RC1 is in multisite / subsite mode, new uploads to the Media library fail with upload.php giving a 404 error.
If I upload an image while creating a post, the upload succeeds and thereafter the Media Library functions as expected.
Attachments (1)
Change History (33)
#2
@
14 years ago
Here's another clue: it *works* as expected if you are physically on the computer where WP is hosted. To be sure this wasn't some junky mess from the beta release, I installed Windows 2008 R2 and WP3 fresh this morning and go the same exact results as before when accessing the site from another computer. But when I access it from the same computer, it behaves.
#4
follow-ups:
↓ 5
↓ 6
@
14 years ago
Did you use the latest nightly of 3.0, or RC1? There have been some related fixes since RC1.
#5
in reply to:
↑ 4
@
14 years ago
Replying to ryan:
Did you use the latest nightly of 3.0, or RC1? There have been some related fixes since RC1.
RC1. Will try last build right now.
#6
in reply to:
↑ 4
@
14 years ago
Replying to ryan:
Did you use the latest nightly of 3.0, or RC1? There have been some related fixes since RC1.
Same result with nightly build.
#8
in reply to:
↑ 7
@
14 years ago
Replying to ryan:
You may need to "Save Changes" on the Settings -> Permalinks page to force an update of web.config.
Some related problems are being investigated for #13644.
xref #13679
Thanks for the tips, but still no luck. Strangely, all the imported rules weren't in my web.config file, so I re-pasted them from the Network page. Still got the same results, though.
#10
@
14 years ago
I'm using IIS6 and latest WordPress 3.0-RC2. Using isapi_rewrite for SEF links.
I can't see any of this issues at all.
This is probably on IIS7 error, especially with web.config.
#11
follow-up:
↓ 12
@
14 years ago
@rossmith I attached a new web.config could you please give it a try and see if you still have the same issue?
#12
in reply to:
↑ 11
@
14 years ago
Replying to Frumph:
@rossmith I attached a new web.config could you please give it a try and see if you still have the same issue?
With the new web.config, I was unable to log on to a subsite at all. Once I gave my credentials, I got a 404 error.
#13
follow-up:
↓ 19
@
14 years ago
What URLRewrite module are you using? http://www.iis.net/download/urlrewrite ? subsite = (subdirectory/subdomain)? the above web.config is what I revamped this morning for subdomain. That whole 'it works if i'm local on the machine' leads me to believe that your IIS isn't supporting $_SERVER variables from remote users but I would rather believe it's the web.config
#15
follow-up:
↓ 17
@
14 years ago
When you get 404 for upload.php and you are on a remote computer, what is the full URL that gives 404? Is it http://localhost/wp-admin/upload.php or http://yourblogdomain.com/wp-admin/upload.php ?
#17
in reply to:
↑ 15
@
14 years ago
Replying to ruslany:
When you get 404 for upload.php and you are on a remote computer, what is the full URL that gives 404? Is it http://localhost/wp-admin/upload.php or http://yourblogdomain.com/wp-admin/upload.php ?
#18
in reply to:
↑ 14
@
14 years ago
Replying to Frumph:
Is your PHP mapped isapi/cgi/fast-cgi?
Fast-cgi, this was installed using the Web Platform installer.
#19
in reply to:
↑ 13
;
follow-up:
↓ 20
@
14 years ago
Replying to Frumph:
What URLRewrite module are you using? http://www.iis.net/download/urlrewrite ? subsite = (subdirectory/subdomain)? the above web.config is what I revamped this morning for subdomain. That whole 'it works if i'm local on the machine' leads me to believe that your IIS isn't supporting $_SERVER variables from remote users but I would rather believe it's the web.config
URL Rewrite is v.2. I installed it on 5/16/2010 using the Web Platform Installer v2
#20
in reply to:
↑ 19
@
14 years ago
Replying to rosmith@…:
Replying to Frumph:
What URLRewrite module are you using? http://www.iis.net/download/urlrewrite ? subsite = (subdirectory/subdomain)? the above web.config is what I revamped this morning for subdomain. That whole 'it works if i'm local on the machine' leads me to believe that your IIS isn't supporting $_SERVER variables from remote users but I would rather believe it's the web.config
URL Rewrite is v.2. I installed it on 5/16/2010 using the Web Platform Installer v2
How would I check your $_SERVER theory?
#22
follow-up:
↓ 23
@
14 years ago
The media library uploader was the only place where media-upload.php was being used as a form action with being wrapped in admin_url(). Let's see if [15171] makes a difference.
#24
in reply to:
↑ 23
@
14 years ago
Replying to rosmith@…:
Replying to ryan:
The media library uploader was the only place where media-upload.php was being used as a form action with being wrapped in admin_url(). Let's see if [15171] makes a difference.
I've never done this before. Should I replace line 73 in this file with the code referenced?
This change doesn't seem to have made a difference.
#25
follow-up:
↓ 26
@
14 years ago
You should use the wordpress update your wordpress installation in the dashboard, it'll take care of everything for you instead of you editing the files themself.
#26
in reply to:
↑ 25
@
14 years ago
Replying to Frumph:
You should use the wordpress update your wordpress installation in the dashboard, it'll take care of everything for you instead of you editing the files themself.
OK. I tried it on both the server that I've been troubleshooting and another that I built as a totally fresh install. Update from dashboard brought down a new version of that file. But the error still occurs.
#27
follow-up:
↓ 28
@
14 years ago
Odd question, are they both subdomain.domain.tld/subdirectory installs?
is one just domain.tld/subdirectory and the other subdomain.domain.tld ?
would explain a few things if you were doing subdomain ones, then it could be the web.config stripping off the subdomain for subdirectory installations (or the urlrewrite)
#28
in reply to:
↑ 27
@
14 years ago
Replying to Frumph:
Odd question, are they both subdomain.domain.tld/subdirectory installs?
is one just domain.tld/subdirectory and the other subdomain.domain.tld ?
would explain a few things if you were doing subdomain ones, then it could be the web.config stripping off the subdomain for subdirectory installations (or the urlrewrite)
Both are subdomain.domain.tld/subdirectory installs. In the case of the fresh install, I get the error on the top-level site (since I haven't actually created any posts or uploaded any media at all). I agree that the problem must be something weird in urlrewrite (and therefore web.config), but I'm basing that theory mainly on the fact that the error doesn't occur when I access the website using the browser on the server itself.
#29
@
14 years ago
- Keywords reporter-feedback added
- Milestone changed from 3.0 to Unassigned
This certainly sounds like a server configuration issue, not a bug as far as any of us can tell at this time. Please try the support forums -- http://wordpress.org/support/.
#30
@
14 years ago
@rossmith: Can you send me the original web.config file that reproduces the original error? You can contact me at http://ruslany.net/contact/
Also, I noticed that you need to be careful with the Site URL/Domain name when setting up multisite feature. I did the subdirectory install on the localhost. Then when I connected to that machine by using it's DNS name, the site did not work. I had to change the site URL in a bunch of places in the wp-options table because it contained "localhost" instead of the server name.
Once I ensured that site URL is not localhost anywhere in the database, the site started to work and the media upload feature also worked.
#31
@
14 years ago
This is caused by a bug in IIS FastCGI that has been fixed in IIS 7 but hasn't yet been fixed in IIS 7.5. Here is how to fix this:
If this happens on IIS 7 then install this update: http://ruslany.net/2010/03/important-update-for-iis-7-0-fastcgi-module/
If this happens on IIS 7.5 (Windows 7 or Windows 2008 R2) then use the workaround described here: http://blogs.iis.net/kehand/archive/2009/08/09/php-and-custom-error-pages.aspx. Note that this will be fixed in the SP1 of Windows 7 and Win2k8 R2.
See #13644