How to solve the Cannot write to log file Error in Joomla administrator

In this post i explain how to fix “An error has occurred. 0 Cannot open file for writing log” Error in Joomla administrator area.

There are two following main reasons to occur this Error in Joomla administrator area.

Website Folder and File permissions are not set up properly

Incorrect Path Value is defined $log_path setting in configuration.php file

How to Fix that Error :

Edit your Joomla’s configuration.php and make confirm your logs file is properly set to the absolute path(marked as red) with log folder. Make sure defined the folder exists (if it doesn’t, create it).

For Ex : /home/sitename/public_html/log alternatively you can set it to “administrator/logs” instead of log.

Know your site absolute path using following Coding :

<?php 
$path = getcwd();
echo $path; exit;
?>

Check your site all folders permission as 755 and files permission as 644.

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *