php setting an error log

I'm having a hard time forcing my application to log errors. Here is a file hierarchy:

          | +-config
          | | +-errors.php
          | +-controllers
          | +-log
          | | +-error.log
          | +-etc...
          | +-index.php

And here is the errors.php :

 * This is configuration for error handling

//to display errors in browser, set 1
//to write errors to a  log file, set 1
//set default file to log errors
//error reporting level, set to E_ALL to see all errors and notices

I read in some article that this might be caused by the safe mode, so i turned it of, but it changed nothing.

Also have an idea that my path might be wrong, in that case, what should it be?

I realise that this question was asked before, but i have already read these articles and they didn't helped me. Even though this is a kind of a "debug my code" question, could someone help me?

(p.s. im sure the error.php file was reached and executed.) (p.p.s. error.php is included in index.php)


So i commented the safe mode line and dumped these lines:

error_reporting => int(22527)

error_log => bool(true)


Thank you for the posts, i learned quite a couple of things from them. When i tried the absolute path i learned that the problem is in file rights. All i had to do is

sudo chmod 777 error.log

Anyway, is it a good idea to have a file with 777 rights in your project directory?

Need Your Help

How to resolve issues with using external packages in IntelliJ?

java intellij-idea packages libraries rserve

I recently switched from eclipse to Intellij and hence I am new new to it. Till a day before I was successfully able to compile my java program (maven) and generate output. The program uses multiple

Facebook Graph Api Like custom action approval changes

facebook facebook-graph-api facebook-like like

I create a custom facebook graph action named "Like" with my custom object say "Photo" and also set Inherits From to Like. Now when i submit for approval they send back for changes with following m...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.