On May 29, 2007, at 11:46 AM, Clinton Gormley wrote:
The only way I can think of would be to make a web request in PHP, so
the PHP program does an HTTP request to your web server, to call the
perl script, then does something with the data that is returned.
Not optimal, but it may suit your needs
I don't think thats not-optimal at all. I do it a lot.
If you're going that route, i'd drop apache on the php side.
You probably don't want to run mod_php and mod_apache on the same
httpd process -- it'll eat a ton of memory , and not be very fast, as
both will compete against each other for resources and memory.
you'll want 2 separate web server pools.
There's really no advantage to running php under apache , vs any
other system. mod_perl, mod_python, mod__everything_else all have
wonderful apache hooks that offer you a lot of flex in apache.
mod_php doesn't. so i'd drop the apache for php, run nginx w/fastcgi
+php w/eaccelerator|apc (which is considerably faster), and then run
a small pool of mod_perl servers in the back for your requests. you
should see a big increase in performance.
in our setup, we do this:
port 80: nginx
ports: 7000-9000 modperl ( handlers assigned to individual ports
)
ports: 10000-10100 twisted_python
ports: 11000-11100 nginx w/ php-fcgi
rewrite rules on port80 assign urls to handlers in mp ( via specific
ports ), or applications in twisted or php.
modperl itself sometimes just makes an internal request to a service
on a higher port
using this approach, we *dramatically* cut down on memory usage and
cpu bottlenecks. we can quickly port code to another language that
can execute it faster w/less resource usage. that ends up in
mod_perl being able to serve way more requests/second than before.
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -