Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6252137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:44:38+00:00 2026-05-24T13:44:38+00:00

I installed wordpress in a media temple server and noticed that couldn’t upload files.

  • 0

I installed wordpress in a media temple server and noticed that couldn’t upload files. After tryng several solutions decided to replicate the problem with a simple script (http://pastie.org/2349720).

<?php
if($_FILES)
        print_r($_FILES);
if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/png")
|| ($_FILES["file"]["type"] == "image/pjpeg"))
&& ($_FILES["file"]["size"] < 200000))
  {
  if ($_FILES["file"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file"]["name"] . "<br />";
    echo "Type: " . $_FILES["file"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";

    if (file_exists("uploads/" . $_FILES["file"]["name"]))
      {
      echo $_FILES["file"]["name"] . " already exists. ";
      }
    else if (!file_exists($_FILES["file"]["tmp_name"]))
      {
      echo 'temp file doesn\'t exists';
      }
    else
      {
      $uploaded=move_uploaded_file($_FILES["file"]["tmp_name"],
      $_FILES["file"]["name"]);
      if($uploaded)
        echo "Stored in: " . "uploads/" . $_FILES["file"]["name"];
      else
        echo "fallo la carga del archivo";
      }
    }
  }
else
  {
  echo "Invalid file";
  }
?>

<html>
<body>

<form action="" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>

</body>
</html>

Looks like move_upload_file() is returning false without a warning or error, looked in php documentation and found this

If filename is not a valid upload file, then no action will occur, and
move_uploaded_file() will return FALSE.

I’ve checked and the file upload doesn’t report any errors and the temporary file exist before trying to move it. Already set 777 permission in folder and still not having any luck, any idea on what can be causing this behavior and how to fix it?

thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:44:38+00:00Added an answer on May 24, 2026 at 1:44 pm

    Turns out i had fastCGI disabled, i’ve just enabled and things are working as expected. Thanks for your help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've installed Wordpress here http://www.trsmithroofing.co.uk/flat_roof_blog and I've noticed that URL re-writes are working nicely.
I am trying to install WordPress MU in my XAMPP localhost server (that is
I have wordpress installed at the web root directory of a server. I also
I'm having some trouble reading files with Indy from a site that has WordPress
I installed Wordpress User Photo plugin that allows to show an authors photo. So
I just installed the jQuery Lightbox Plugin on my wordpress blog. But that totally
I have a Apache server running at Rackspace Cloud Hosting, so I've installed Wordpress
I've installed a WordPress instance on a Linux server, and I need to give
I currently have Wordpress installed in the base path of my server. Wordpress uses
I'm working for a client who installed WordPress on his server. But it doesn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.