为什么php脚本会在log_message中死掉?

What would cause my script to die on this line:

log_message('debug', "Config Class Initialized");

Details:

This line is in codeigniter system/core/config.php file and is on a site that previously worked however i have just installed it into a new CentOS 6.4 virtual machine.

I suspect it's some apache configuration issue.

The answer to why this line of code is not working is that i used nfs (network file system) as the way to access my virtual machine's folder (containing my code) from the host machine and the flock function does not work over nfs.

The solution for me was to simply comment out all lines where flock was being used, I figure since this is a local development environment there is not likely going to be a need to prevent multiple users from writing to files like the error log.

A better solution would be to use php runkit to redefine the flock function so that it does nothing but i haven't been able to figure this out yet. The reason this is better is that i could have one file such as my index redefine the function and then i wouldn't have to gitignore all the files with the comments (or svn ignore).

You have probably a different version of PHP