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

  • Home
  • SEARCH
  • 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 6882739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:17:35+00:00 2026-05-27T05:17:35+00:00

While I was trying to uplaod file using php on windows machine its working

  • 0

While I was trying to uplaod file using php on windows machine its working fine :

   <form action="php/bulk.php"
  enctype="multipart/form-data" method="post">
  <p>
   Please specify a file below:<br>
  </p>
    <div>
  <input id="datafile" type="file" name="datafile" size="40"><br>
  <input type="submit" value="Upload File">
 </div></form>

code on bulk.php :

$connector = new DbConnector();
$target_path = "uploads/";
$target_path = $target_path . basename( $_FILES['datafile']['name']);

if(move_uploaded_file($_FILES['datafile']['tmp_name'], $target_path)) {
  echo "The file ".  basename( $_FILES['datafile']['name']).
  " has been uploaded.  \n";

} else{
echo "There was an error uploading the file, please try again!";
?>
<form action="../addsamples.php">
 <input type="submit" value="Go Back" />
</form>
<?php
    exit (-1);
}

I tried uploading on server and its not working there ! Do Operating system play any role in this ? My server is red hat linux and test m/c is windows

  • 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-27T05:17:35+00:00Added an answer on May 27, 2026 at 5:17 am

    The most likely problem is the file-permissions. Does the user that is running the web-server (apache I think for red hat) have write-permissions for php/uploads/?

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

Sidebar

Related Questions

While trying to implement an MVC file upload example on Scott Hanselman's blog. I
While trying to compile a 64 bit linux kernel using gcc, I see the
I'm getting this error (see title) while trying to parse an XML file in
I'm trying to create file upload using iframe(ajax effect) but I need to know
I'm trying to POST some data as if I was using FORM on HTML
I'm trying to upload a file using an Ant task. If I use Ant
Hi I am trying to upload image file using perl cgi-application. Not sure what
I trying to upload a zip file. In my project i am using DWR
im trying to upload a file using org.apache.commons.fileupload. but i dont no, what mistake
I am trying to upload files using WCF. Everything under 16K works fine, but

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.