![]() |
File Upload - Server is not responding - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: File Upload - Server is not responding (/showthread.php?tid=13041) |
File Upload - Server is not responding - El Forum - 11-08-2008 [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/'; File Upload - Server is not responding - El Forum - 11-08-2008 [eluser]zimco[/eluser] Wild stab at this: but could it be a file permissions problem on the failing to upload files? The "failed to open stream...permission denied" error notice in your log makes me think you need to do some type of chmod on the problem files to get the proper permissions set on the file. File Upload - Server is not responding - El Forum - 11-08-2008 [eluser]Joey Marchy[/eluser] Good thinking. I compared the permissions of files that upload fine with those that don't and both are 644. File Upload - Server is not responding - El Forum - 11-09-2008 [eluser]zimco[/eluser] Hmmm. That is weird, thought for sure it had something to do with permissions from what the error log was saying. Anyhow, I can tell you that i downloaded the file you attached as a problem file and using the simple upload controller/view found in the CI User Guide i had no problem uploading the file to my server. So, i don't think it is a problem with the file. The other error it is showing: undefined variable course_id. is something to look at, is it undefined because the file did not upload properly or is there a problem elsewhere in your code? $this->coursemodel->updateIcon($course_id, $data['upload_data']['file_name']) File Upload - Server is not responding - El Forum - 11-10-2008 [eluser]Joey Marchy[/eluser] Thank you, I'll look into that also. Once I figure it out I'll post about it here. File Upload - Server is not responding - El Forum - 05-07-2009 [eluser]Tobz[/eluser] Hi Joey, did you ever find out what was going on here? Cheers File Upload - Server is not responding - El Forum - 05-08-2009 [eluser]Joey Marchy[/eluser] Tobz, This was an issue with my local development environment. When I uploaded my files to the web host, everything worked fine. If you are getting this error and developing locally, try it on your web host. I never figured out why I was getting the error message in my local environment. Let me know if you have any other questions. |