APC: Logging for compile errors?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
joshw
Forum Newbie
Posts: 1
Joined: Fri Jun 12, 2009 2:59 pm
Location: Findlay, Ohio

APC: Logging for compile errors?

Post by joshw »

I've been happily using APC for the last few months, but there's one problem I've been having. It seems that since APC is in charge of compiling the code, it's also in charge of logging compile errors. Except that... well, it doesn't. My error_log only contains runtime errors. Parse errors only come through when I disable APC.

How can I log compile errors when using APC?
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: APC: Logging for compile errors?

Post by Mark Baker »

Test every script by doing

Code: Select all

php -l filename.php
from the command line

You can also use apc_compile_file() to compile the file from within a script. This function returns false if there are errors
Post Reply