I have a custom C extension loaded in my PHP and inside the extension there the function does something like this
void a() { printf("abc"); }
I can call a() without any problems in the CLI (command line) mode and get the abc output, as expected. But when I tried again in the Yii project in PHP-FPM mode, I could not get this output.
I'm sure:
- The extension is loading.
- The function call was successfully completed without errors.
- PHP output buffering is disabled. I called
ob_end_clean() twice before calling a() , the first call returned true , and the second returned false .
So my question is:
Should I get output from extensions in PHP-FPM mode?
If so, how can I capture the output, or please, give me some debugging tips.
source share