9 March 2010 at 11:16am
I'm running into a problem when uploading files. I think it is a server issue, as I have the exact code on a different server where it works fine. However, I can't find anything that would be causing the difference when I compare phpinfo() for both sites. I did SWFUploadConfig::debug(); & the only difference between the two is that I'm getting an array output on the site that isn't uploading.
Here's the very bottom of debug results for site where upload is working:
9 March 2010 at 12:00pm
Thanks UncleCheese. I appreciate your help.
I was hoping it was something else. When I set the temporary folder in php.ini, now I get a "new-file" issue; where it "appears" the image uploads to assets. However, the file is named "new-file" (regardless of the file's name I'm trying to upload) & then upon hitting "refresh", the "new-file" disappears. And the swfupload debug output is the same for both the server where the upload is working & where it is not working. If I remove the dataobject_manager & swfupload modules, I get an error message that upload_tmp_dir needs to be set in php.ini (but phpinfo() says upload_tmp_dir is set).
I feel like I'm in a hamster wheel running endless circles. And there's probably a simple solution that I'm just not seeing right now.
I had a problem similar to this. By changing the file encoding of SWFUploadControls.php from UTF-8 to Cp1252 everything suddely worked fine. I have other weird problems with the otherwise brilliant work of UncleCheese. I guess that text encoding might be the source of these problems.
I eventually figured out that it was indeed the upload_tmp_dir. I took a guess and added "/home" before the client's main directory.
Here is a list of what I tried in my php.ini [and what the hosting company told me should work] that did not work:
upload_tmp_dir = "tmp/"
upload_tmp_dir = "/tmp/"
upload_tmp_dir = "username/tmp/"
upload_tmp_dir = "/username/tmp/"
Here is what did work:
upload_tmp_dir = "/home/username/tmp/"
So in my case, it was an issue with the server & the client's hosting company.
Thank you both for your answers and troubleshooting! I really appreciate it!!