prashanth-g
prashanth-g

Reputation: 1233

Can't write logs in linux using Yii::log?

in Yii based web application i am writing log files using

Yii::log('info', CLogger::INFO, $exception);

It is perfectly working in Windows. But when i try this in RHEL 6.0 it is not writing and not showing any error response

I have changed the directory permissions as well

chmod 777 /var/www/html/yiiblog/protected/runtime

but it s not working and not showing any thing in error log of apache

What is the reason for this and how to fix this ?

Upvotes: 1

Views: 211

Answers (1)

lin
lin

Reputation: 18392

Your chmod command is wrong. Try this one instead and take a look at the documentation.

chmod 0777 /var/www/html/yiiblog/protected/runtime

Exactly, this is the difference between 777/0777.

0777 (octal) == binary 0b 111 111 111 == permissions rwxrwxrwx (== decimal 511)
777 (decimal) == binary 0b 1 100 001 001 == permissions sr----x--x (== octal 1411)

Upvotes: 1

Related Questions