PHP upload script won't upload. Problem with IIS config?
Posted on 2004-03-25
I have a script for uploading picture files to a MySQL table, running on an IIS 6.0 with support for PHP.
I think there is no problem with the script. The query performs the insert,
but the fields that will contain the picture file blob data, file size and type don't
contain anything coz $_FILES array simply doesn't contain the data.
In fact, after turning on error_reporting, it warns at the line $_FILES['emppic']...
that emppic is an unrecognized index. I double checked the form tags, the file input type
is named emppic, no typo errors. the needed enctype="multipart/form-data" is also there.
I checked php.ini, file_uploads is turned on. the upload directory points to a location
that IIS could write to (for testing, I pointed it to the location where the session files
are save, coz I'm sure IIS could write to that directory, my sessions work). upload size is set to 2M.
I've run out of ideas. I'm quite inclined that this is an IIS config problem. Maybe it blocks posting or
uploading of files. Or maybe there is a DLL that I need to enable or install first (I read an article
that requires a DLL to be configured with IIS or ASP pages). Any solutions?