Upload, problem with dir

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
alb.amati
Forum Newbie
Posts: 4
Joined: Thu Nov 13, 2008 2:40 am

Upload, problem with dir

Post by alb.amati »

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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Upload, problem with dir

Post by requinix »

You sure that d:\php\tmp already exists? Does it have the permissions to allow the IIS user access to the directory?
alb.amati
Forum Newbie
Posts: 4
Joined: Thu Nov 13, 2008 2:40 am

Re: Upload, problem with dir

Post by alb.amati »

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
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Upload, problem with dir

Post by VladSun »

There are 10 types of people in this world, those who understand binary and those who don't
alb.amati
Forum Newbie
Posts: 4
Joined: Thu Nov 13, 2008 2:40 am

Re: Upload, problem with dir

Post by alb.amati »

VladSun wrote:Use Apache ;)
Is this
http://www.justskins.com/forums/39407-n ... 34489.html
your problem?
I'd like do to it, but it's my choice!
anyway... it's not that problem, I re-define also the session dir...

Bye,
Alberto
alb.amati
Forum Newbie
Posts: 4
Joined: Thu Nov 13, 2008 2:40 am

Re: Upload, problem with dir

Post by alb.amati »

ouch!

http://bugs.php.net/bug.php?id=44420

It's still open
Any workaround?
Any idea?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Upload, problem with dir

Post by requinix »

Make a quick PHP script to try to write a file to that location.
Something as simple as

Code: Select all

touch("D:/php/tmp/temp.temp");
should be enough.
Make sure you have display_errors on.
Post Reply