WordPress “Upload.php Error” Fix

Software

  • WordPress 2.3.3  

Server Environment

  • Windows 2003 Server
  • IIS 6
  • PHP 5.2.5
  • MySQL 5.0.51a

Problem Description

Solution

  1. Open /wp-admin/upload.php file in your favourite editor
  2. Around line 90 find the following code:
    $_href = clean_url( $href);
  3. Replace it with following code:
    // begin GamaFX.com upload.php Fix
      //ORIGINAL CODE: $_href = clean_url( $href);
      $BH_temp = explode(“?”, clean_url( $href ));
      $href = ‘upload.php?’ . $BH_temp[1];
      $_href = $href;
    // end GamaFX.com upload.php Fix
  4. Around line 104 find the following code:
    ‘base’ => add_query_arg( ‘paged’, ‘%#%’ ),
  5. Replace it with following code:
    // begin GamaFX.com upload.php Fix
      //ORIGINAL CODE:
    ‘base’ => add_query_arg( ‘paged’, ‘%#%’ ),
      ‘base’ => ‘upload.php?style=inline&tab=browse-all&paged=%#%’,
    // end GamaFX.com upload.php Fix