WordPress.org

Ready to get started?Download WordPress

Forums

windows [IIS] browse all, manage uploads (5 posts)

  1. wpiisnewbie
    Member
    Posted 7 years ago #

    In writing a new post or page, if I click on "Browse All", it loads the dashboard into the frame; or in manage>uploads if I click "Browse all", it links back to the dashboard. In writing a post or page, I can upload a file, select how I want it to display, and send it to the editor without issue. The error seems to occur whenever I click "Browse All". I'm on a windows server with IIS6, PHP 4.x. Not using mod_ssl or isapi_rewrite. I've tested the following error on WP 2.3.1 and a clean install of 2.3.2 (with no plugins), with the same behavior.

  2. zTARz
    Member
    Posted 7 years ago #

    I am having the exact same problem on version 2.3.2, fresh install, IIS 6, MySQL 5.0.21, PHP version 5.1.4.

    In Write mode, I can successfully upload a file (say a .gif) and send it to the Editor, and it appears correctly in the post. It exists in the /wp-content/uploads folder (in the date hierarchy automatically created).

    However, if I go back to Write mode to create a new post and click the Browse All link, instead of seeing the file I previously uploaded, the Dashboard loads in a frame.

    If I go to the Manage Uploads page, the file displays, but if I click on the thumbnail, I'm taken immediately back to the Dashboard.

    The URL that attempts to load when I click on the thumbnail for the .gif file in Manage Uploads is http://www.mywebsite.com/blog/wp-admin/?action=edit&ID=6

    The URL for "Browse All" in Write mode is:
    http://www.mywebsite.com/blog/wp-admin/?style=inline&tab=browse-all&post_id=-1201564460&_wpnonce=4b12327c4f&ID&action&paged

    Any ideas on what's happening and how to fix it?

    TIA!

  3. zTARz
    Member
    Posted 7 years ago #

    Here's another thread with someone having the same issue, with more info - it appears the update.php script name is being ommitted in the URLs.

    http://wordpress.org/support/topic/139731?replies=5

    I have verified that this is indeed the issue - if I copy the URL link into the address bar of the browser and add upload.php before the ?action or ?style (i.e. http://www.mywebsite.com/blog/wp-admin/upload.php?action=... then it works perfectly.

    So the question now is - why is the script name being ommitted on these URLS and how to fix the problem?

  4. Loughlin
    Member
    Posted 6 years ago #

    Here is a solution for this problem. I'm using WP 2.3.3

    It's dirty, it's a hack but it works and when you have a client shitting down your neck it's a fix that fits...

    Open up /wp-admin/upload.php and go to line 116 or thereabouts.

    The $_href variable needs to explicitly contain upload.php for Windows-based servers to properly call the upload.php file (or at least my Win-based shared hosting does) so we are going to chop up the $_href url and lash in upload.php into it using this incredibly unsexy code:

    $exploded_href = explode("/wp-admin/", $_href);
    $new_href = "/wp-admin/upload.php".$exploded_href[1];

    This code should go in just before this line:

    echo "\t<li class='$class'><a href='$_href' class='upload-tab-link' title='{$tab_array[0]}'>{$tab_array[0]}</a>$page_links</li>\n";

    Now change the occurence of $_href in the line above to $new_href and you are good to go.

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    The general problem is that IIS sucks. It doesn't adhere to standards and give a proper REQUEST_URI value.

    Here's the general fix for that problem. It will eliminate this headache, and many many more. It's not difficult to install it, but you do need some access to the server. Of course, if you're using IIS, you likely have that access already.

    http://neosmart.net/blog/2006/100-apache-compliant-request_uri-for-iis-and-windows/

    Or just switch to Apache like the rest of the world uses. It works a million times better anyway.

Topic Closed

This topic has been closed to new replies.

About this Topic