I’m trying to write some information to an error logfile, while using CodeIgniter.
That’s how I’m doing it :
error_log($output,3,"dklog.html");
I’ve even tried pre-creating a dklog.html file (with read-write access) and point to its full path :
error_log($output,3,"/public_html/r/dklog.html");
However, in none of these cases am I seeing any output to any file. (In the first case, actually, I can’t find ANY dklog.html file anywhere…). And nope, $output is NOT empty.
What’s going wrong?
UPDATE : Guys, thanks a lot for the useful answers. However, is one of those times where the issue had NOTHING to do with error_log, or codeigniter per se, but with something far more obscure I’ve been using… Thanks a lot, anyway! (The question may close).
Make sure that the log file and directory your are writing to is writable by the web server user. Check your regular error log if it contains an error message that the log file could not be written.