what is the right way to create debug messages in php (the interpreter itself)?
Hi!
I'm hacking php (the interpreter itself) and I have created a number of fprintf(stderr, "blahblah", blah, blah) messages that work like a charm in php cli but now I want to debug it in apache. How is it done? I noticed my messages don't show up either in apache's error.log or access.log so I guess I'm either looking at the wrong place or it's not the right way to do it. Thanks in advance |
ap_log_error() seems to be the way to do it.
I have included http_log.h in the c file I'm working on but now I get this: Code:
/usr/include/apache2/http_log.h:94:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ap_default_loglevel’ What's going on? |
Ok.... a few includes where missing:
Code:
#include <apr.h> Code:
/usr/include/apr-1.0/apr.h:362:1: error: unknown type name ‘off64_t’ Code:
typedef off64_t apr_off_t; |
I have included sys/types.h but I still get the same error.
Code:
#include <sys/types.h> |
Compile with option -D_LARGEFILE_SOURCE
|
All times are GMT -5. The time now is 10:26 PM. |