Upload, problem with dir

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AA

    Upload, problem with dir

    I use php 5 on IIS 6.
    I change upload_tmp_dir and restart IIS.

    From phpinfo():
    upload_tmp_dir 'D:\php\tmp'

    But, if I print $_FILE:
    ["tmp_name"]=string(26) "C:\WINDOWS\Tem p\php1CA.tmp"

    I want to change the upload dir of tmp file...

    Any suggestion?

    Thanks,
    Alberto
  • =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?=

    #2
    Re: Upload, problem with dir

    AA escribió:
    I use php 5 on IIS 6.
    I change upload_tmp_dir and restart IIS.
    >
    From phpinfo():
    upload_tmp_dir 'D:\php\tmp'
    >
    But, if I print $_FILE:
    ["tmp_name"]=string(26) "C:\WINDOWS\Tem p\php1CA.tmp"
    I'm not familiar with IIS but it's likely that the upload process runs
    with the same credentials as the web server. So make sure the IIS user
    has write permission over "D:\php\tmp ". If your computer is called FOO,
    the default IIS user is called IUSR_FOO.

    Also, check the logs.

    --
    -- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
    -- Mi sitio sobre programación web: http://bits.demogracia.com
    -- Mi web de humor al baño María: http://www.demogracia.com
    --

    Comment

    • AA

      #3
      Re: Upload, problem with dir

      On 13 Nov, 10:05, "Álvaro G. Vicario"
      <alvaroNOSPAMTH A...@demogracia .comwrote:
      AA escribió:
      >
      I use php 5 on IIS 6.
      I change  upload_tmp_dir and restart IIS.
      >
      From phpinfo():
      upload_tmp_dir 'D:\php\tmp'
      >
      But, if I print $_FILE:
      ["tmp_name"]=string(26) "C:\WINDOWS\Tem p\php1CA.tmp"
      >
      I'm not familiar with IIS but it's likely that the upload process runs
      with the same credentials as the web server. So make sure the IIS user
      has write permission over "D:\php\tmp ". If your computer is called FOO,
      the default IIS user is called IUSR_FOO.
      >
      Also, check the logs.
      >
      --
      --http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
      -- Mi sitio sobre programación web:http://bits.demogracia.com
      -- Mi web de humor al baño María:http://www.demogracia.com
      --
      gracias, Alvaro

      I check, the ISS user has all the permissions on D:\php\tmp
      In tmp_name I expect to find "d:\php\tmp ", regardless the permission
      to write in it...

      Bye,
      Alberto

      Comment

      • =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?=

        #4
        Re: Upload, problem with dir

        AA escribió:
        >>I use php 5 on IIS 6.
        >>I change upload_tmp_dir and restart IIS.
        >>From phpinfo():
        >>upload_tmp_di r 'D:\php\tmp'
        >>But, if I print $_FILE:
        >>["tmp_name"]=string(26) "C:\WINDOWS\Tem p\php1CA.tmp"
        >I'm not familiar with IIS but it's likely that the upload process runs
        >with the same credentials as the web server. So make sure the IIS user
        >has write permission over "D:\php\tmp ". If your computer is called FOO,
        >the default IIS user is called IUSR_FOO.
        >>
        >Also, check the logs.
        [...]
        I check, the ISS user has all the permissions on D:\php\tmp
        Just to be 100% sure, create a file there from a web page and see if it
        gets there:

        <?php
        touch('D:\php\t mp\test.txt');
        ?>

        If the logs don't display anything, you can try to enable the
        display_startup _errors directive. I admit it didn't work for me (I set a
        wrong path and nothing showed up) but who knows...

        BTW, in my system phpinfo() displays the path without quotes, make sure
        you didn't accidentally add single quotes to the path.

        Sorry, I can't think of anything else.

        In tmp_name I expect to find "d:\php\tmp ", regardless the permission
        to write in it...
        I can't understand what you mean. The tmp_name is the actual path of the
        uploaded file: if it can't create the file there, it won't display sudch
        path.



        --
        -- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
        -- Mi sitio sobre programación web: http://bits.demogracia.com
        -- Mi web de humor al baño María: http://www.demogracia.com
        --

        Comment

        • Jerry Stuckle

          #5
          Re: Upload, problem with dir

          AA wrote:
          I use php 5 on IIS 6.
          I change upload_tmp_dir and restart IIS.
          >
          From phpinfo():
          upload_tmp_dir 'D:\php\tmp'
          >
          But, if I print $_FILE:
          ["tmp_name"]=string(26) "C:\WINDOWS\Tem p\php1CA.tmp"
          >
          I want to change the upload dir of tmp file...
          >
          Any suggestion?
          >
          Thanks,
          Alberto
          Which version of PHP? Possibly it's related to this reported bug?



          --
          =============== ===
          Remove the "x" from my email address
          Jerry Stuckle
          JDS Computer Training Corp.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          • AA

            #6
            Re: Upload, problem with dir

            On 13 Nov, 12:37, Jerry Stuckle <jstuck...@attg lobal.netwrote:
            AA wrote:
            I use php 5 on IIS 6.
            I change  upload_tmp_dir and restart IIS.
            >
            From phpinfo():
            upload_tmp_dir 'D:\php\tmp'
            >
            But, if I print $_FILE:
            ["tmp_name"]=string(26) "C:\WINDOWS\Tem p\php1CA.tmp"
            >
            I want to change the upload dir of tmp file...
            >
            Any suggestion?
            >
            Thanks,
            Alberto
            >
            Which version of PHP?  Possibly it's related to this reported bug?
            >

            >
            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstuck...@attgl obal.net
            =============== ===- Nascondi testo citato
            >
            - Mostra testo citato -
            Oh,no!
            It's seem exactly the same thing described there...
            same versions of ISS, PHP, MS Windows...
            same behaviour...

            thanks,
            alberto


            Comment

            • AA

              #7
              Re: Upload, problem with dir

              On 13 Nov, 12:37, "Álvaro G. Vicario"
              <alvaroNOSPAMTH A...@demogracia .comwrote:
              AA escribió:
              >
              >I use php 5 on IIS 6.
              >I change  upload_tmp_dir and restart IIS.
              >From phpinfo():
              >upload_tmp_d ir 'D:\php\tmp'
              >But, if I print $_FILE:
              >["tmp_name"]=string(26) "C:\WINDOWS\Tem p\php1CA.tmp"
              I'm not familiar with IIS but it's likely that the upload process runs
              with the same credentials as the web server. So make sure the IIS user
              has write permission over "D:\php\tmp ". If your computer is called FOO,
              the default IIS user is called IUSR_FOO.
              >
              Also, check the logs.
              [...]
              I check, the ISS user has all the permissions on D:\php\tmp
              >
              Just to be 100% sure, create a file there from a web page and see if it
              gets there:
              >
              <?php
              touch('D:\php\t mp\test.txt');
              ?>
              >
              If the logs don't display anything, you can try to enable the
              display_startup _errors directive. I admit it didn't work for me (I set a
              wrong path and nothing showed up) but who knows...
              >
              BTW, in my system phpinfo() displays the path without quotes, make sure
              you didn't accidentally add single quotes to the path.
              >
              Sorry, I can't think of anything else.
              >
              In tmp_name I expect to find "d:\php\tmp ", regardless the permission
              to write in it...
              >
              I can't understand what you mean. The tmp_name is the actual path of the
              uploaded file: if it can't create the file there, it won't display sudch
              path.
              >
              --
              --http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
              -- Mi sitio sobre programación web:http://bits.demogracia.com
              -- Mi web de humor al baño María:http://www.demogracia.com
              --
              touched!
              Any other idea?
              Alberto

              Comment

              • AA

                #8
                Re: Upload, problem with dir

                On 13 Nov, 14:20, AA <alb.am...@gmai l.comwrote:
                On 13 Nov, 12:37, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                >
                >
                >
                >
                >
                AA wrote:
                I use php 5 on IIS 6.
                I change  upload_tmp_dir and restart IIS.
                >
                From phpinfo():
                upload_tmp_dir 'D:\php\tmp'
                >
                But, if I print $_FILE:
                ["tmp_name"]=string(26) "C:\WINDOWS\Tem p\php1CA.tmp"
                >
                I want to change the upload dir of tmp file...
                >
                Any suggestion?
                >
                Thanks,
                Alberto
                >
                Which version of PHP?  Possibly it's related to this reported bug?
                >>
                --
                =============== ===
                Remove the "x" from my email address
                Jerry Stuckle
                JDS Computer Training Corp.
                jstuck...@attgl obal.net
                =============== ===- Nascondi testo citato
                >
                - Mostra testo citato -
                >
                Oh,no!
                It's seem exactly the same thing described there...
                same versions of ISS, PHP, MS Windows...
                same behaviour...
                >
                thanks,
                alberto- Nascondi testo citato
                >
                - Mostra testo citato -
                .... the bug is still "open".
                Any idea?
                Workaround?
                bye,
                alb

                Comment

                • Jerry Stuckle

                  #9
                  Re: Upload, problem with dir

                  AA wrote:
                  On 13 Nov, 14:20, AA <alb.am...@gmai l.comwrote:
                  >On 13 Nov, 12:37, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                  >>
                  >>
                  >>
                  >>
                  >>
                  >>AA wrote:
                  >>>I use php 5 on IIS 6.
                  >>>I change upload_tmp_dir and restart IIS.
                  >>>From phpinfo():
                  >>>upload_tmp_d ir 'D:\php\tmp'
                  >>>But, if I print $_FILE:
                  >>>["tmp_name"]=string(26) "C:\WINDOWS\Tem p\php1CA.tmp"
                  >>>I want to change the upload dir of tmp file...
                  >>>Any suggestion?
                  >>>Thanks,
                  >>>Alberto
                  >>Which version of PHP? Possibly it's related to this reported bug?
                  >>http://bugs.php.net/bug.php?id=44420
                  >>--
                  >>============= =====
                  >>Remove the "x" from my email address
                  >>Jerry Stuckle
                  >>JDS Computer Training Corp.
                  >>jstuck...@att global.net
                  >>============= =====- Nascondi testo citato
                  >>- Mostra testo citato -
                  >Oh,no!
                  >It's seem exactly the same thing described there...
                  >same versions of ISS, PHP, MS Windows...
                  >same behaviour...
                  >>
                  >thanks,
                  >alberto- Nascondi testo citato
                  >>
                  >- Mostra testo citato -
                  >
                  ... the bug is still "open".
                  Any idea?
                  Workaround?
                  bye,
                  alb
                  All I can suggest is to follow the bug and see what the resolution is.
                  You could also add in a comment that you're experiencing the same problem.

                  --
                  =============== ===
                  Remove the "x" from my email address
                  Jerry Stuckle
                  JDS Computer Training Corp.
                  jstucklex@attgl obal.net
                  =============== ===

                  Comment

                  Working...