[PHP] File Upload and NT...

2001-08-24 Thread Joseph Koenig

Sorry, I know file uploads are asked about all the time...

I'm having an odd problem on a WinNT system.

When I try to do my upload, I test the file to see the type of it:
$image_info = GetImageSize($the_image);

However, that line gives me:
Warning: getimagesize: Unable to open
'/Joe1/Desktop%20Folder/device_eval.gif' for reading. in
D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on
line 22

At first I had thought this would be a permissions issue, but the file
it can't open is the one being uploaded. If I echo the file being
uploaded, i get:
Image Name: /Joe1/Desktop%20Folder/device_eval.gif

I swear I looked at the archive and I've done this plenty of times
before (but on Unix). This project is being done on NT, which I'm fairly
unfamiliar with though. Any help would be much appreciated.

Thanks,

Joe

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] File Upload and NT...

2001-08-24 Thread Rasmus Lerdorf

Try putting it in a directory that doesn't have a space in it.

On Fri, 24 Aug 2001, Joseph Koenig wrote:

 Sorry, I know file uploads are asked about all the time...

 I'm having an odd problem on a WinNT system.

 When I try to do my upload, I test the file to see the type of it:
 $image_info = GetImageSize($the_image);

 However, that line gives me:
 Warning: getimagesize: Unable to open
 '/Joe1/Desktop%20Folder/device_eval.gif' for reading. in
 D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on
 line 22

 At first I had thought this would be a permissions issue, but the file
 it can't open is the one being uploaded. If I echo the file being
 uploaded, i get:
 Image Name: /Joe1/Desktop%20Folder/device_eval.gif

 I swear I looked at the archive and I've done this plenty of times
 before (but on Unix). This project is being done on NT, which I'm fairly
 unfamiliar with though. Any help would be much appreciated.

 Thanks,

 Joe




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] File Upload and NT...

2001-08-24 Thread Erik H. Mathy

 I'm having an odd problem on a WinNT system.

That's what NT is all about. ;)

 When I try to do my upload, I test the file to see the type of it:
 $image_info = GetImageSize($the_image);

Out of curiousity, who don't you try using:

if(is_file($the_image)) {
do something...
} else {
kick out no file warning...
}

Docs:
http://www.php.net/manual/en/function.is-file.php

 However, that line gives me:
 Warning: getimagesize: Unable to open
 '/Joe1/Desktop%20Folder/device_eval.gif' for reading. in
 D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on
 line 22

Have you specifically sent the uploaded file there? If not, it's more than
likely in whatever temporary upload folder you have defined in your php.ini
file.

 At first I had thought this would be a permissions issue, but the file
 it can't open is the one being uploaded. If I echo the file being
 uploaded, i get:
 Image Name: /Joe1/Desktop%20Folder/device_eval.gif

Oh! OK, I get it...you're tossing it up onto your desktop. So that path
isn't correct. It should be:

C:\WINNT\Profiles\Joe1\Desktop\device_eval.gif

In general, you're better off placing that file someplace other than the
desktop. Make a folder somewhere nice and generic, like D:\Uploads\Images\ .
That'll make your life a whole lot easier.

Hope this helps, drop me a line if it doesn't...
- Erik


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] File Upload and NT...

2001-08-24 Thread Joseph Koenig

Actually,

The warning is coming from when I try and upload the file from the
desktop of my Mac. It's supposed to get uploaded into:
C:\WINNT\PHP\UPLOADTEMP. I checked phpinfo() and that's where it says
the upload_tmp_dir is. By the way, I was using the getimagesize to check
if the file is a .gif, .jpg, etc. Even without the getimagesize(), the
file still isn't being uploaded into the temp folder. I'm using,
basically, the same function that I use on Unix systems. Is there
something magic about doing uploads on windows that I don't know about? Thanks,

Joe

Erik H. Mathy wrote:
 
  I'm having an odd problem on a WinNT system.
 
 That's what NT is all about. ;)
 
  When I try to do my upload, I test the file to see the type of it:
  $image_info = GetImageSize($the_image);
 
 Out of curiousity, who don't you try using:
 
 if(is_file($the_image)) {
 do something...
 } else {
 kick out no file warning...
 }
 
 Docs:
 http://www.php.net/manual/en/function.is-file.php
 
  However, that line gives me:
  Warning: getimagesize: Unable to open
  '/Joe1/Desktop%20Folder/device_eval.gif' for reading. in
  D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on
  line 22
 
 Have you specifically sent the uploaded file there? If not, it's more than
 likely in whatever temporary upload folder you have defined in your php.ini
 file.
 
  At first I had thought this would be a permissions issue, but the file
  it can't open is the one being uploaded. If I echo the file being
  uploaded, i get:
  Image Name: /Joe1/Desktop%20Folder/device_eval.gif
 
 Oh! OK, I get it...you're tossing it up onto your desktop. So that path
 isn't correct. It should be:
 
 C:\WINNT\Profiles\Joe1\Desktop\device_eval.gif
 
 In general, you're better off placing that file someplace other than the
 desktop. Make a folder somewhere nice and generic, like D:\Uploads\Images\ .
 That'll make your life a whole lot easier.
 
 Hope this helps, drop me a line if it doesn't...
 - Erik
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]