Opened 5 years ago
Closed 4 years ago
#7118 closed defect (bug) (invalid)
New media uploader uploads files to the wp-admin directory.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 2.5.1 |
| Severity: | normal | Keywords: | uploader, wp-admin, wrong, folder |
| Cc: |
Description
I searched through the tickets and didn't find any uploader bugs that were similar to mine, but I apologize if this is a duplicate.
I have 2.5.1 installed on a standard shared web hosting package at Network Solutions. I can upload images, but after they have uploaded, I cannot see any thumbnails, and if I insert the image into a post, it generates a broken link.
I have WordPress installed in the root of my website, and the upload folder is standard(wp-content/uploads), but when I FTP into my site, no files have been added in that directory.
The files are being uploaded, but they are in wp-admin/wp-content/uploads. No matter what I do, or how I edit my upload path, the files are uploaded somewhere in my wp-admin directory.
Searching through the WordPress support forums, I have found several other people who are also having this problem with the uploader
I followed all of Otto42's suggestions in a sticky post in the forum, and nothing seems to affect the results I am having.
I have posted in greater detail about this problem on the WordPress forum:
http://wordpress.org/support/topic/180107
If I can provide more details about this bug to anyone, I would be happy to do so.
Change History (9)
Replying to ryan:
Maybe lose the realpath() check and see if that helps.
What do I have to edit to accomplish this?
Replying to jleuze:
What do I have to edit to accomplish this?
wp-includes/functions.php, around line 1054.
In the function path_is_absolute, there's these two lines:
if ( realpath($path) == $path ) return true;
Remove or comment them out. See if that changes anything.
Replying to Otto42:
Remove or comment them out. See if that changes anything.
For some unknown reason, last week my blogs started to upload files correctly. This change was spontaneous, I didn't change anything on my end.
I even tried over from scratch with a fresh install of WordPress and a new database, and my uploader still works. Which is a good thing I suppose!
But it is strange, I can only guess that my webhost, Network Solutions, made some adjustment that is causing the uploader to function correctly.
I am sorry, since my problem fixed itself, I won't be able to help you with this bug.

Somehow, their ABSPATH variable is not getting included in the path returned by wp_upload_dir.
See this forum thread for details:
http://wordpress.org/support/topic/182297