1

I understand cherry.py server is multithreaded which theoretically would be a problem with php fastcgi in general. But would it be possible? has anyone tried it and can please share the idea/experience. Honestly I don't know where to start at all on configuring cherry.py for such a setup.

would the php-fpm be more reasonable solution to this?

I am thinking that it may be possible similar to nginx to send request to php-fpm from cherry.py with proper config.

Abhishek Dujari
  • 567
  • 2
  • 5
  • 17

2 Answers2

2

CherryPy is built and designed for one specific purpose: serving dynamic content written in python.

While you could conceivably send an http request to a separate FastCGI process via python's urllib, then feed that string data back as a response to the request that came in to Cherry... there's really no reason to do that, and no circumstance where it becomes a good idea.

Shane Madden
  • 112,982
  • 12
  • 174
  • 248
  • I think you are right. I would have to setup the php pages on another server and direct requests to it somehow possibly using another server to map separate url pattern to cherrypy or php as the case maybe. thanks again for your insight – Abhishek Dujari May 24 '11 at 03:38
0

You probably want to set up a web server as proxy. Let it decide which requests should be routed to a PHP-module and which ones should be routed to the Python/WSGI application.

Johan
  • 427
  • 1
  • 4
  • 14