Ticket #7118 (new defect)

Opened 4 months ago

Last modified 3 months ago

New media uploader uploads files to the wp-admin directory.

Reported by: jleuze Assigned to: ryan
Priority: normal Milestone: 2.9
Component: General Version: 2.5.1
Severity: critical 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

06/16/08 15:07:19 changed by Otto42

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

06/24/08 17:59:58 changed by Otto42

Ref: Ticket #5953

(follow-up: ↓ 5 ) 06/24/08 18:27:21 changed by ryan

Maybe lose the realpath() check and see if that helps.

06/24/08 18:27:28 changed by ryan

  • owner changed from anonymous to ryan.

(in reply to: ↑ 3 ; follow-up: ↓ 6 ) 06/30/08 15:56:35 changed by jleuze

Replying to ryan:

Maybe lose the realpath() check and see if that helps.

What do I have to edit to accomplish this?

(in reply to: ↑ 5 ; follow-up: ↓ 7 ) 06/30/08 16:09:18 changed by Otto42

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.

(in reply to: ↑ 6 ) 07/09/08 19:52:17 changed by jleuze

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.

07/15/08 16:24:07 changed by ryan

  • milestone changed from 2.5.2 to 2.9.

Milestone 2.5.2 deleted