Connecting Tech Pros Worldwide Help | Site Map

Upload, problem with dir

  #1  
Old November 13th, 2008, 08:55 AM
AA
Guest
 
Posts: n/a
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\Temp\php1CA.tmp"

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

Any suggestion?

Thanks,
Alberto
  #2  
Old November 13th, 2008, 09:15 AM
=?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?=
Guest
 
Posts: n/a

re: Upload, problem with dir


AA escribió:
Quote:
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\Temp\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
--
  #3  
Old November 13th, 2008, 11:05 AM
AA
Guest
 
Posts: n/a

re: Upload, problem with dir


On 13 Nov, 10:05, "Álvaro G. Vicario"
<alvaroNOSPAMTHA...@demogracia.comwrote:
Quote:
AA escribió:
>
Quote:
I use php 5 on IIS 6.
I change *upload_tmp_dir and restart IIS.
>
Quote:
From phpinfo():
upload_tmp_dir 'D:\php\tmp'
>
Quote:
But, if I print $_FILE:
["tmp_name"]=string(26) "C:\WINDOWS\Temp\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
  #4  
Old November 13th, 2008, 11:45 AM
=?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?=
Guest
 
Posts: n/a

re: Upload, problem with dir


AA escribió:
Quote:
Quote:
Quote:
>>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\Temp\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.
[...]
Quote:
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\tmp\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.

Quote:
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
--
  #5  
Old November 13th, 2008, 11:45 AM
Jerry Stuckle
Guest
 
Posts: n/a

re: Upload, problem with dir


AA wrote:
Quote:
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\Temp\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.
jstucklex@attglobal.net
==================
  #6  
Old November 13th, 2008, 01:25 PM
AA
Guest
 
Posts: n/a

re: Upload, problem with dir


On 13 Nov, 12:37, Jerry Stuckle <jstuck...@attglobal.netwrote:
Quote:
AA wrote:
Quote:
I use php 5 on IIS 6.
I change *upload_tmp_dir and restart IIS.
>
Quote:
From phpinfo():
upload_tmp_dir 'D:\php\tmp'
>
Quote:
But, if I print $_FILE:
["tmp_name"]=string(26) "C:\WINDOWS\Temp\php1CA.tmp"
>
Quote:
I want to change the upload dir of tmp file...
>
Quote:
Any suggestion?
>
Quote:
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...@attglobal.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


  #7  
Old November 13th, 2008, 03:45 PM
AA
Guest
 
Posts: n/a

re: Upload, problem with dir


On 13 Nov, 12:37, "Álvaro G. Vicario"
<alvaroNOSPAMTHA...@demogracia.comwrote:
Quote:
AA escribió:
>
Quote:
Quote:
>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\Temp\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.
>
Quote:
Quote:
Also, check the logs.
[...]
Quote:
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\tmp\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.
>
Quote:
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
  #8  
Old November 13th, 2008, 03:45 PM
AA
Guest
 
Posts: n/a

re: Upload, problem with dir


On 13 Nov, 14:20, AA <alb.am...@gmail.comwrote:
Quote:
On 13 Nov, 12:37, Jerry Stuckle <jstuck...@attglobal.netwrote:
>
>
>
>
>
Quote:
AA wrote:
Quote:
I use php 5 on IIS 6.
I change *upload_tmp_dir and restart IIS.
>
Quote:
Quote:
From phpinfo():
upload_tmp_dir 'D:\php\tmp'
>
Quote:
Quote:
But, if I print $_FILE:
["tmp_name"]=string(26) "C:\WINDOWS\Temp\php1CA.tmp"
>
Quote:
Quote:
I want to change the upload dir of tmp file...
>
Quote:
Quote:
Any suggestion?
>
Quote:
Quote:
Thanks,
Alberto
>
Quote:
Which version of PHP? *Possibly it's related to this reported bug?
>>
Quote:
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================- Nascondi testo citato
>
Quote:
- 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
  #9  
Old November 13th, 2008, 05:25 PM
Jerry Stuckle
Guest
 
Posts: n/a

re: Upload, problem with dir


AA wrote:
Quote:
On 13 Nov, 14:20, AA <alb.am...@gmail.comwrote:
Quote:
>On 13 Nov, 12:37, Jerry Stuckle <jstuck...@attglobal.netwrote:
>>
>>
>>
>>
>>
Quote:
>>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\Temp\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...@attglobal.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@attglobal.net
==================
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
image upload problem geertolaerts@gmail.com answers 2 May 12th, 2007 08:25 PM
Problem with HTML in ASP.Net App TCook answers 4 July 21st, 2006 08:25 AM
Problem with WinForms User Control Hosted in IE Segfahlt answers 5 January 13th, 2006 10:05 AM
Problem with Persits ASPUpload John Rebbeck answers 3 July 19th, 2005 06:45 AM