Version 25rc1 with XAMPP

See all posts Reply

Version 25rc1 with XAMPP new!
by rr1024, 16 years ago
Hello I was setting up a test server on my little winXP machine using XAMPP

I have using your script with great joy on my live server "linux" and I set up my little test server and tried to use the same exact code and all I get is the error message

"Error: File error. Please try again"

I outputed the $_POST['File'] and the path to the file being uploaded
it looks like
C:\\Documents and Settings\\me\\My Docs\\5026-1.dat
the dat file I'm trying to upload via http to my test server.

I was just wondering if this has ever been tested on a windows box, I copied and pasted the Posted var to windows explorer to see if explore could understand it but it said file not found but if I remove the extra slashes it finds the file.

Anyway thanks for any help.Reply
Re: Version 25rc1 with XAMPP new!
by colin, 16 years ago
I don't use Windows at all, so I can't really test it at the moment.

However, it has been reported to work on Windows, and also with IIS.

Can you copy here the logs from the class, that you can output after the class stops with the file error?

Also, check if you have magic quotes on, it may affect the backslahes that Windows uses in filenames.Reply
Re: Version 25rc1 with XAMPP new!
by rr1024, 16 years ago
for the record and so in case someone else runs into this problem

I did print_r( $_FILES ); and the array was empty
step 1 verified my php.ini had file_uploads set to On
step 2 found that I needed the following in my form
enctype="multipart/form-data"

Took me some time, if you don't have enctype set there is no output to the log files so you can't see what the problem is.

FYI this upload script is the greatest thing since sliced bread! LOL

Thanks I think I'm going to add an error code to the version of the script.

Something to the effect of
IF ( !is_array( $file ) or empty($file[name] )){
  $this->upload = false;
  this->error =_('php _FILES returned empty array');
}
Reply
Re: Version 25rc1 with XAMPP new!
by colin, 16 years ago
Glad you solved your issue.

By the way, the solution is in the doc and in the FAQ ;)

As for the error message, I will add it in the next release, and will suggest to check the FORM tag.Reply