RE: [PHP-WINDOWS] File upload problem

From: Date: Mon, 19 Jun 2000 22:42:16 +0000
Subject: RE: [PHP-WINDOWS] File upload problem
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-537@lists.php.net to get a copy of this message
I had the same problem and someone has told me that I have to install php4 on the dir windows or winnt it depends with the php.exe and php.ini there and We have enough with IIS. This week I will try to go on with this. ----- Original Message ----- From: Ignatius Teo <iteo@scu.edu.au> To: <php-windows@lists.php.net> Sent: Monday, June 19, 2000 3:56 PM Subject: [PHP-WINDOWS] File upload problem > Hi all, > > I have a script that does a file upload. > > If the form enctype is application/x-www-form-urlencoded, eveything's cool > and HTTP_POST_VARS returns this: > > $HTTP_POST_VARS[MyFile]=D:\php3\Examples\test.txt > > But if the form enctype is multipart/form the filename variable is set to > the upload_dir setting in php.ini (in this case c:/temp - the \\php2 gets > tacked on the end and it appears to be some sort of counter inserted by the > php intepreter). HTTP_POST_VARS returns this: > > $HTTP_POST_VARS[MyFile]=c:/temp\php2 > > On dumping all HTTP_POST_VARS, I get: > MyFile_name,test.txt > MyFile,c:/temp\\php2 > MyFile_size,1868 > submit,submit > > And because my destination file is set to: > $upload_dir = "d:/temp"; > $MyFile = stripslashes($HTTP_POST_VARS[MyFile]); > $destFile = $upload_dir.basename($MyFile); > > I end up with a filename: > $destFile=d:/Temp/temp\php2 > > And thus I get an error: > Warning: Unable to create 'd:/Temp/temp\php2': No such process in > d:\php3\examples \fileupload.php3 on line 20 > Error uploading file to d:/Temp/temp\php2 > > Is this a bug? Or am I missing something? I ask because I'd like to be able > to use the "MyFile_size" variable that's automatically returned. > > > Ignatius > PS: Apache 1.3.12, PHP3 CGI or PHP4 CGI or mod (doesn't make a diff), Win98. > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.windows (#537) next »