[eluser]Joey Marchy[/eluser]
When using the file upload class, some image files upload fine while others timeout. After a timeout, I can go back and upload other files fine. It just seems to be particular files. Things I have tried to fix this issue:
* Rename files before uploading
Any thoughts or ideas would be greatly appreciated.
Here is the message I receive:
Quote:Safari could not open the page “http://apol0829.dev/app/course/do_upload” because the server is not responding.
I've attached an example of one file that times out continually (pic003.jpg). Here is a copy of my log file from the time uploading begins to the timeout:
DEBUG - 2008-11-08 17:28:45 --> Config Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Hooks Class Initialized
DEBUG - 2008-11-08 17:28:45 --> URI Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Router Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Output Class Initialized
ERROR - 2008-11-08 17:28:45 --> Severity: Warning --> fopen(/Users/joeymarchy/Sites/apol0829/app/apol0829/cache/26657d5ff9020d2abefe558796b99584) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied /Users/joeymarchy/Sites/apol0829/app/apol0829/codeigniter/Common.php 49
DEBUG - 2008-11-08 17:28:45 --> Input Class Initialized
DEBUG - 2008-11-08 17:28:45 --> XSS Filtering completed
DEBUG - 2008-11-08 17:28:45 --> XSS Filtering completed
DEBUG - 2008-11-08 17:28:45 --> XSS Filtering completed
DEBUG - 2008-11-08 17:28:45 --> XSS Filtering completed
DEBUG - 2008-11-08 17:28:45 --> XSS Filtering completed
DEBUG - 2008-11-08 17:28:45 --> XSS Filtering completed
DEBUG - 2008-11-08 17:28:45 --> Global POST and COOKIE data sanitized
DEBUG - 2008-11-08 17:28:45 --> Language Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Loader Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Config file loaded: config/freakauth_light.php
DEBUG - 2008-11-08 17:28:45 --> Helpers loaded: url, form, array, freakauth_light, html
DEBUG - 2008-11-08 17:28:45 --> Database Driver Class Initialized
DEBUG - 2008-11-08 17:28:45 --> FreakAuth Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Session Class Initialized (db)
DEBUG - 2008-11-08 17:28:45 --> sending session cookie
DEBUG - 2008-11-08 17:28:45 --> Helpers loaded: form
DEBUG - 2008-11-08 17:28:45 --> Helpers loaded: url
DEBUG - 2008-11-08 17:28:45 --> Helpers loaded: freakauth_light
DEBUG - 2008-11-08 17:28:45 --> Model Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Model Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Model Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Model Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Controller Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Model Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Validation Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Model Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Model Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Upload Class Initialized
DEBUG - 2008-11-08 17:28:45 --> Language file loaded: language/english/upload_lang.php
ERROR - 2008-11-08 17:28:45 --> The file was only partially uploaded.
DEBUG - 2008-11-08 17:28:45 --> File loaded: /Users/joeymarchy/Sites/apol0829/app/apol0829/application/views/template/menu_account.php
DEBUG - 2008-11-08 17:28:45 --> File loaded: /Users/joeymarchy/Sites/apol0829/app/apol0829/application/views/template/header.php
ERROR - 2008-11-08 17:28:45 --> Severity: Notice --> Undefined variable: course_id /Users/joeymarchy/Sites/apol0829/app/apol0829/application/views/course_add_upload.php 24
DEBUG - 2008-11-08 17:28:45 --> File loaded: /Users/joeymarchy/Sites/apol0829/app/apol0829/application/views/template/footer.php
DEBUG - 2008-11-08 17:28:45 --> File loaded: /Users/joeymarchy/Sites/apol0829/app/apol0829/application/views/course_add_upload.php
DEBUG - 2008-11-08 17:28:45 --> Language file loaded: language/english/profiler_lang.php
DEBUG - 2008-11-08 17:28:45 --> Final output sent to browser
DEBUG - 2008-11-08 17:28:45 --> Total execution time: 0.0584
Here is the code from do_upload()
Code:
$config['upload_path'] = './uploads/course_icons/';
$config['allowed_types'] = 'gif|jpg|png';
$config['encrypt_name'] = 'TRUE';
$config['max_size'] = '500000';
$config['max_width'] = '1600';
$config['max_height'] = '1200';
$this->load->library('upload', $config);
if ( ! $this->upload->do_upload())
{
$data['error'] = array('error' => $this->upload->display_errors());
$this->load->view('course_add_upload', $data);
}
else
{
$data = array('upload_data' => $this->upload->data());
$this->coursemodel->updateIcon($course_id, $data['upload_data']['file_name']);
redirect('course/view/'.$course_id, 'location');
}