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 6220115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:54:08+00:00 2026-05-24T07:54:08+00:00

First issue, where is it suppose to be? Accordint to php.net Files will, by

  • 0

First issue, where is it suppose to be?

Accordint to php.net

Files will, by default be stored in the server’s default temporary
directory, unless another location has been given with the
upload_tmp_dir directive in php.ini. The server’s default directory
can be changed by setting the environment variable TMPDIR in the
environment in which PHP runs

So I go to my php.ini file and find

upload_tmp_dir = "\xampplite\tmp"

And let me go ahead and post by xhtml code:

          <div class="t2_c2">
            <form name="f9" enctype="multipart/form-data" action="pi5.php" method="POST">
            <input type="hidden" name="MAX_FILE_SIZE" value="100000" />
            <input name="ufile" type="file" class="te7" />
            </form>
          </div>

This is a form inside a column, inside a table.

And last but not least the javascript that submits this form.

document.f9.submit();

Because there is alot of files non of which appear to be my file in the temp directory I add some debug php code to look at the $_FILES super global associative array.

The code

print_r($_FILES['ufile']);

returns this info.

Array ( [name] => c0.css [type] => text/css [tmp_name] =>
F:\xampplite\tmp\php317C.tmp [error] => 0 [size] => 10652 ) The file
c0.css

on a second run in produces

Array ( [name] => here.gif [type] => image/gif [tmp_name] =>
C:\Users\a\AppData\Local\Temp\phpC256.tmp [error] => 0 [size] => 8549
)

which I find odd, that this is not specified in the php.ini file and proves php.net documentation invalid.

Life is lookin good until I go to the [tmp_name] and find this:

tmp_name directory

No file.

My plan was to change my php.ini file so that the file is downloaded directly to where I want it, but according the answers below, the file only lasts as long as the php script is running, so this does not appear to be an option or at minimal a simple option. That was why I did not use the move function at first.

  • 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-24T07:54:09+00:00Added an answer on May 24, 2026 at 7:54 am

    The tmp_name is only valid for the lifetime of the PHP script execution, after which the file is cleaned up. You need to move_uploaded_file() to a permanent location in the same script execution for it to persist.

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

Sidebar

Related Questions

I'm attempting to issue two concurrent AJAX requests. The first call (/ajax_test1.php) takes a
First off, there's a bit of background to this issue available on my blog:
We have an issue on our page whereby the first time a button posts
I am facing strange issue on Windows CE: Running 3 EXEs 1)First exe doing
First, this issue is not about block elements collapsing when their children are floated.
i am first time using Popoverview, and i have one issue when i am
Wanting to implement authentication by client certificates I am experiencing some issues. First some
First, let's get the security considerations out of the way. I'm using simple authentication
First off, I am using Windows XP. I have multiple hard drives and it
First off, I understand the reasons why an interface or abstract class (in the

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.