Return of "File upload issues with CodeIgniter…? " |
[eluser]Dr. Seuss[/eluser]
Hello All. I originally added this to another thread, but thought that it might deserve its own topic after much investigation. UPDATE: I wanted to validate that the file was making it to the server from the form; used this Code: echo "FILES--"; ...and got this result: Quote:FILES--Array ( [userfile] => Array ( [name] => custom.txt [type] => text/plain [tmp_name] => /tmp/php0Opxtb [error] => 0 [size] => 80 ) ) ...so obviously things are making it "up" just not getting processed to my "uploads" directory by the "File Uploading Class". **************************** **************************** I have followed the suggestions in this thread for debugging; have verified that I can detect a folder and file's existence (independently), but don't seem to be able to upload a file. The code is thus Code: $this->load->helper(array('form', 'url')); ...which returns the following: Quote:woohoo, folder and file found In the original thread, the culprit was the lack of "../" (double dot, forward slash). In my case the "single dot, forward slash" is required because my structure is: + www/ ---CI ---static ---uploads ...but as noted above, I can detect the presence of a test file using this code: Quote:if(is_file("./uploads/desktop.ini")){ "$this->upload->display_errors()" does not appear to return any errors, either. From Perusing StackOverflow, there were "upload class" posts there where the following suggestions resolved the user's issue: --chmod the "uploads" dir to "755" instead of "777" per the manual. I tried this with no discernible effect. --Use doc root per this: $up['upload_path'] =$_SERVER['DOCUMENT_ROOT'] . '/' .'uploads/'; ...again, this made no improvement for me. I did add as second "test" to see if I could get o my file with the doc root construct, like so: Code: if(is_file($up['upload_path']."/desktop.ini")){ ...and it works just like the relative, non-explicit path worked above. I have been searching the forums and have not found anyone else who has reported that "file_path" and 'full_path" array values would be populated with no other returned values. Makes no sense; if the function is succeeding to the degree that these two array values would be filled, why not the other values and the file appear in the "uploads" dir? Quote: [upload_data] => Array Lastly, I do not know if the fact that I am hosting on Dreamhost is germane to this problem or not. Any and all further ideas for tracking the down the source of the problem would be appreciated. Seuss |
Welcome Guest, Not a member yet? Register Sign In |