I have moved a CodeIgniter based site from a Windows based server to a Linux based server. I have had various issues. Currently I am stuck on images failing to upload. (server timeout error)
Steps taken: Set uploads folder to 777. Try php 5.4 & 5.2. I was looking for a suspected temp folder somewhere, but not finding one. I have searched, and found an article discussing CodeIgniter timing out after 300s. But in my case, it times out almost immediately upload is initiated. File attempting to upload is 41kb. I have checked php settings, max_input_time: 60, upload_max_filesize: 64M, post_max_size: 64M Not sure what else I can add.
After more searching, and some tests, it is more than likely a conflict between Ajax and CI. A normal php upload works. I found a few articles discussing issues with CI and Ajax. Unfortunately, they dont seem to match my code.
And more: I found some log files. They do correspond to what I did on the website. The first line is the last line displaying action of refreshing web page and time taken. The following lines are for click on browse for image and click upload. Interesting is a couple of ignored attempts to load files.
DEBUG - 2015-06-10 01:58:43 --> Total execution time: 0.0495
DEBUG - 2015-06-10 02:00:10 --> Config Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Hooks Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Utf8 Class Initialized
DEBUG - 2015-06-10 02:00:10 --> UTF-8 Support Enabled
DEBUG - 2015-06-10 02:00:10 --> URI Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Router Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Output Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Input Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Global POST and COOKIE data sanitized
DEBUG - 2015-06-10 02:00:10 --> Language Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Loader Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Helper loaded: url_helper
DEBUG - 2015-06-10 02:00:10 --> Helper loaded: sql_date_helper
DEBUG - 2015-06-10 02:00:10 --> Helper loaded: form_helper
DEBUG - 2015-06-10 02:00:10 --> Database Driver Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Native_session Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Session class already loaded. Second attempt ignored.
DEBUG - 2015-06-10 02:00:10 --> Cart Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Encrypt Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Model Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Model Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Model Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Controller Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Template Class Initialized
DEBUG - 2015-06-10 02:00:10 --> MY Controller Class Initialized
DEBUG - 2015-06-10 02:00:10 --> Encrypt class already loaded. Second attempt ignored.
More Info: 11 Jun 2015:
After much searching, I think this is not a CodeIgniter Issue. It appears to be an issue with Dojo. I found this within the product.php file
if (!$this->ajaxupload->do_upload('flashUploadFiles'))
Somewhere in this file there should be settings for Dojo, but I cannot find them. Dont know what I am looking for really. The help on the Dojo website seems really confusing. I also supect that there is more than just upload the Dojo files and put some code in the correct place to activate it. I wonder if there is something that has to be activated on the server.
I have also added Dojo to the Tags List
The error may be related to permission, just follow the steps, these may help you