1

I have created my own PHP extension in c++ (linux). when zend engine compiles the PHP code am getting the active user functions and internal functions name.

To debug this php extension am using zend_printf to print the values.

Instead of zend_printf wants to write in log file. I checked with FILE I/O, fstream not working here.

How to create the log file in php extension using c/c++?

Tim Fountain
  • 33,093
  • 5
  • 41
  • 69
Durai
  • 87
  • 12

1 Answers1

0

Finally i found my log file location. In my php extension had c++ code to open the file as follows,

fpo = fopen("/tmp/ResultRequest.txt", "a+");

But it created inside the location "/tmp/systemd-private-*************-httpd.service-pRXgTf/tmp/ResultRequest.txt"

This location will be deleted when you restart the apache server.

Durai
  • 87
  • 12