Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

class 'CakeLog' not found error in cakephp 2.1

I have installed cakephp 2.1 in windows server 2008 and it gives me following error

Fatal Error: Class "CakeLog" not found in "C:\wamp\www\foldername\app\Config\bootstrap.php" on line 172

Fatal Error: Class "CakeLog" not found in "C:\wamp\www\foldername\lib\Cake\Error\ErrorHandler.php" on line 200

Whereas when I am running it on window 7 32 bit server, it's working smoothly.

Can anyone please tell me how can I make it run on windows server 2008.

like image 977
Rashi Goyal Avatar asked Sep 17 '25 01:09

Rashi Goyal


2 Answers

I've had this issue several times and my resolution has always been

  1. if this installation was copied from a previous application delete the files && folders in the tmp directory and recreated them and all the subfolders e.g cache + (models,persistent,views) and logs

  2. Make sure that the /tmp directory is "Write-able" chmod -R 777

p.s the error message given is not descriptive enough

like image 172
Balambi Avatar answered Sep 18 '25 14:09

Balambi


I have searched for a solution for this let me know if it worked for you or not because this solved my problem

In cake version CakePHP v 2.0 I simply commented the following code in C:\wamp\www\foldername\app\Config\bootstrap.php file

 //Configures default file logging options

App::uses('CakeLog', 'Log');CakeLog::config('debug', array('engine' => 'FileLog','types' => array('notice', 'info', 'debug'),'file' => 'debug',));
CakeLog::config('error', array('engine' => 'FileLog','types' => array('warning', 'error', 'critical', 'alert', 'emergency'),'file' => 'error',));
like image 28
Rashi Goyal Avatar answered Sep 18 '25 13:09

Rashi Goyal