I am trying to upload a file using CodeIgniter. This server seems to have something strange going on because the code works fine on other servers. I'm trying to debug the issue but no errors are being reported.
To be specific, the code:
if (!$this->upload->do_upload()) {
var_dump($this->upload->display_errors());
exit();
}
I have turned error_reporting(E_ALL) on and display_errors, nothing is shown. Just a blank page. I know these settings work because if I make a syntax error, the errors will show. It's just a complete blank page when I upload a file. It is 100% sure uploading a file.
I have even turned on the CodeIgniter log, error reporting level set to 4, but no log files are being written at all. I have set it to the default log file.
Finally, I checked the PHPinfo() settings for file_uploads and all seems okay. They are set to on, no crazy upload limit or anything like that.
I can create files with fopen() and it writes the file to the server fine.
Any ideas on what I can do to try and debug? I don't have server access (it's for a client) so I'm trying to rely on using SFTP and error output. But I'm getting nothing.
I managed to get the log file to output this:
INFO - 2016-11-28 01:24:07 --> Session: Class initialized using 'files' driver.
INFO - 2016-11-28 01:24:07 --> Model Class Initialized
INFO - 2016-11-28 01:24:07 --> Controller Class Initialized
INFO - 2016-11-28 01:24:07 --> Model Class Initialized
INFO - 2016-11-28 01:24:07 --> Model Class Initialized
INFO - 2016-11-28 01:24:07 --> Helper loaded: email_helper
INFO - 2016-11-28 01:24:07 --> Upload Class Initialized
So it seems the script stops at the Upload Class Initialized part.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…