Reputation: 35
I'm migrating my joomla 3.3.6 project from local to online server, but I get this error when I try to login into my administrator panel:
Error: 0 Cannot open file for writing log
My tmp and logs paths are correct in my configuration.php, and the permissions of the folders and files are correct too (755 and 644).
I don't know what else to do.
Upvotes: 3
Views: 15216
Reputation: 139
This worked for me:
Check path of your application, by
<?php
$path = getcwd();
echo "Your Absolute Path is:" . $path;
?>
then set
$log_path = 'Your Absolute Path'/logs
If it does not solve issue, then
First check in ssh who owns the /var/www
directory by:
ls -la /var
Then check what user apache uses
ps aux | grep apache
or you can use:
ps aux | grep http
output:
apache 29672 0.0 1.3 388232 14240
root 29679 0.0 0.2 110456 2252
in my case apache user for /var/www
was apache
so after this I made apache
the owner of /var/www
by:
sudo chown -R apache /var/www
Upvotes: 3
Reputation: 2233
When you done the migration, the configure paremeters were changing also. Access the root folder where you installed Joomla, there you will locate a file with name "configuration.php". Open the file and change the following lines with the new path of logs and tmp folders:
public $log_path = '/path/to/the/joomla/logs';
public $tmp_path = '/path/to/the/jooomla/tmp';
Also please check the permissions of the above folders when modifying. In CentOS I changed the permissions of logs/error.php to 666 then it works.
Upvotes: 8
Reputation: 11
It is easy to resolve. Access configuration.php using FTP or cpanel. Edit directly in cpanel or download it to your computer using ftp. Edit the Log and Tmp paths to .../log and .../tmp respectly. That solves it. Get back on Joomla backend to verify by Accessing System>>System Information>>Directory Permissions. Hope that helps.
Upvotes: 1