Connecting Tech Pros Worldwide Forums | Help | Site Map

Upload, problem with dir

AA
Guest
 
Posts: n/a
#1: Nov 13 '08
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

=?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?=
Guest
 
Posts: n/a
#2: Nov 13 '08

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
--
AA
Guest
 
Posts: n/a
#3: Nov 13 '08

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
=?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?=
Guest
 
Posts: n/a
#4: Nov 13 '08

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
--
Jerry Stuckle
Guest
 
Posts: n/a
#5: Nov 13 '08

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
==================
AA
Guest
 
Posts: n/a
#6: Nov 13 '08

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


AA
Guest
 
Posts: n/a
#7: Nov 13 '08

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
AA
Guest
 
Posts: n/a
#8: Nov 13 '08

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
Jerry Stuckle
Guest
 
Posts: n/a
#9: Nov 13 '08

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