File Manager problem on Windows 2003 and IIS6
Permalink 1 user found helpful
Hello,
i am having slight troubles getting the File Manager uploads to work on my windows 2003/IIS6 installation. I did already a lot of research into this matter and I can't seem to find the answer I am looking for.
1) Normal php file uploads are working: I wrote a standard HTML/PHP Upload script and checked that the tmp folder in php.ini is writable and that the file can be copied to the correct directory.
2) I double-checked with my FTP account and the uploaded files are getting uploaded correctly and they appear somewhere in the folder structure within the installation_path/files directory. The files are complete so the upload was successful.
The weird thing is that even though the files are getting uploaded, the File Manager hangs during the upload process and never returns from it. This is the case for the single file upload and the multiple file upload.
I also tried to place files in the "incoming" directory and have them imported through the "add incoming files" feature. This didn't work either: the files didn't get deleted or copied or moved or whatever.
I tried Firebug but all I am getting is the "500 - Internal Server Error" message back from the POST request.
I would be thankful for any constructive feedback.
i am having slight troubles getting the File Manager uploads to work on my windows 2003/IIS6 installation. I did already a lot of research into this matter and I can't seem to find the answer I am looking for.
1) Normal php file uploads are working: I wrote a standard HTML/PHP Upload script and checked that the tmp folder in php.ini is writable and that the file can be copied to the correct directory.
2) I double-checked with my FTP account and the uploaded files are getting uploaded correctly and they appear somewhere in the folder structure within the installation_path/files directory. The files are complete so the upload was successful.
The weird thing is that even though the files are getting uploaded, the File Manager hangs during the upload process and never returns from it. This is the case for the single file upload and the multiple file upload.
I also tried to place files in the "incoming" directory and have them imported through the "add incoming files" feature. This didn't work either: the files didn't get deleted or copied or moved or whatever.
I tried Firebug but all I am getting is the "500 - Internal Server Error" message back from the POST request.
I would be thankful for any constructive feedback.
The whole problem had nothing to do with the web server setup but was related to a bug that has also been discussed here:
http://www.concrete5.org/community/forums/usage/upload-on-5-4-1/...
The static "add" function in the File class executes the sql query that writes the uploaded file into the database. This works ok most of the time but here's the catch:
MySQL 5.1 handles data type default values differently than 5.0. While in 5.0, numeric types would always get defaulted to 0, in 5.1 this behavior depends on the current mysql strict mode. If strict mode is enabled (as in my case), the insert statement produces an error and the insert fails.
You can read about that behavior by comparing the 5.0 documentation:
http://dev.mysql.com/doc/refman/5.0/en/data-type-defaults.html...
versus the 5.1 documentation:
http://dev.mysql.com/doc/refman/5.1/en/data-type-defaults.html...
To fix this bug, you could either explicitly set the ocID field in the "files" table to default to 0 or you could change your sql statement to include a default value.
This problem is NOT related to IIS or windows but to mysql in general!