Codeigniter not logging Codeigniter not logging codeigniter codeigniter

Codeigniter not logging


$config['log_path'] is supposed to be a path to a directory, not a file. CI writes its own files in the format log-2012-12-05.php. Try a path to a directory, and make sure to include a trailing slash.

/*|--------------------------------------------------------------------------| Error Logging Directory Path|--------------------------------------------------------------------------|| Leave this BLANK unless you would like to set something other than the default| application/logs/ folder. Use a full server path with trailing slash.|*/$config['log_path'] = '/var/log/ci_logs/';


the problem is SELinux check this post.

you try this:

# Ownershipsudo chown apache:apache -R /data/www/html/sites/mysitecd /data/www/html/sites/mysite# File permissions, recursivefind . -type f -exec chmod 0644 {} \;# Dir permissions, recursivefind . -type d -exec chmod 0755 {} \;# SELinux serve files off Apache, resursivesudo chcon -t httpd_sys_content_t /data/www/html/sites/mysite -R# Allow write only to specific dirssudo chcon -t httpd_sys_rw_content_t /data/www/html/sites/mysite/logs -Rsudo chcon -t httpd_sys_rw_content_t /data/www/html/sites/mysite/uploads -R

https://blog.lysender.com/2015/07/centos-7-selinux-php-apache-cannot-writeaccess-file-no-matter-what/