2

As title said, how to configure G-WAN to use php-fpm?

Currently using lighttpd with php-fpm. Heard G-WAN maybe even lighter, want to give it a try. But after downloading the package and have it running, doesn't seems to be able to find any doc about php-fpm setup.

Gil
  • 3,279
  • 1
  • 15
  • 25
John Siu
  • 5,056
  • 2
  • 26
  • 47

1 Answers1

1

To have G-WAN support FastCGI you would have to write a G-WAN handler. We did not do that because FastCGI is a much slower interface than the language runtime loaded in the G-WAN process address space.

G-WAN currently supports PH7 (multicore, loaded as a module, like Java, C#, C++, or Objective-C) and our efforts to use Zend PHP as a module failed: this PHP runtime crashes once two G-WAN threads calls it.

Gil
  • 3,279
  • 1
  • 15
  • 25
  • Thx for the answer. I did more research since I post the question and your answer is expected. For my case, the web servers, no matter it is apache, lighttpd or g-wan, are just https handler, so the thinner/lighter/efficient the better. But php-fpm support is a must. The php-cli approach in g-wan benchmark test is just not acceptable. – John Siu Dec 08 '15 at 18:25
  • As explained, *php-cli* is the only way for G-WAN to use the Zend PHP runtime as it crashes in a multithreaded application, like G-WAN. – Gil Dec 09 '15 at 08:09
  • We know about the threading issue with PHP. But on the other hand, we are not using threading in our php code. It is gwan choice of not implamanting a fast-cgi interface, while the current solution (php-cli) is not acceptable. We did some simple test, the gwan website benchmark result is actually showing in how fast php-cli can be invoke and shutdown by the OS, not php performance. – John Siu Dec 09 '15 at 13:48
  • G-WAN can use PHP as a loaded module (rather than as CGI) IF you are NOT using threads, which you say you are doing. The code to do so has been published on Stackoverflow. – Gil Jan 19 '16 at 14:44