On Mar 26, 11:56 pm, Michael Shadle <mike...@gmail.com> wrote:
> This one:http://php-fpm.org/downloads/php-5.2.12-fpm-0.5.13.diff.gz
Awesome. Thank you very much for pointing me in the right direction,
I appreciate it.
Now, the other part I'm having a hard time with is getting apache to
use php-fpm. I've searched through the forums, and found more
questions about how to do it, than answers. I'll try to be very
specific, so in hopes you don't know it someone that might come across
it will. I know you've said before in a prior post you didn't want to
take the time to learn fastcgi. :P
$cat mod_fastcgi.conf
---------------------
# FastCgi Configuration
LoadModule fastcgi_module /usr/lib/httpd/modules/mod_fastcgi.so
AddHandler fastcgi-script .fcgi .fcg .fpl
FastCgiConfig -idle-timeout 20 -maxClassProcesses 1
FastCgiWrapper /usr/sbin/suexec
<Location "/fcgi-bin/php-fastcgi.fcgi">
Order Deny,Allow
Deny from All
Allow from env=REDIRECT_STATUS
Options +ExecCGI +FollowSymLInks +SymLinksIfOwnerMatch
SetHandler fastcgi-script
</Location>
I include this in my main httpd.conf as such:
--------------------------------------------
Include /etc/httpd/mod_fastcgi.conf
a snippit of my httpd-vhosts.conf:
----------------------------------
SuexecUserGroup learnix learnix
ScriptAlias /fcgi-bin "/home/learnix/public_html/cgi-bin/php-
fastcgi.fcgi"
Alias /learnix /home/learnix/public_html
FastCgiExternalServer /learnix -host 127.0.0.1:9000 -user learnix -
group learnix
#FastCgiExternalServer /home/learnix/public_html -host 127.0.0.1:9000 -
user learnix -group learnix
#AddType application/x-httpd-fastphp .php
#Action application/x-httpd-fastphp /learnix
AddHandler php-fastcgi .php
Action php-fastcgi /fcgi-bin
and lastly, my php-fastcgi.fcgi:
~$ cat public_html/cgi-bin/php-fastcgi.fcgi
#!/bin/sh
# Set desired PHP_FCGI_* environment variables.
# Example:
# PHP FastCGI processes exit after 500 requests by default.
export PHPRC=/home/learnix
PHP_FCGI_CHILDREN=3
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=500
export PHP_FCGI_MAX_REQUESTS
# Replace with the path to your FastCGI-enabled PHP executable
umask 0022
#exec /usr/bin/php-cgi --fpm --fpm-config /etc/httpd/php-fpm.conf
exec /usr/bin/php-cgi
#exec /usr/bin/php-cgi -d apc.shm_size=25
Okay, as you can see there i left some of my commented items out
because i just wanted to illustrate what i've tried. Now the above is
obviously a wrapper script. This does not get php-fpm working, it
just gets php-cgi +fastcgi working. In my vhost i do have the fastcgi
external server directive, but when pointing it to my root, it doesn't
work. I also wouldn't think that i would point that to a file for a
wrapper because the wrapper would just execute an instance of php-cgi
which defeats the purpose of running the php-fpm init script to start
the daemon, correct?
Any help is much appreciated in trying to figure how to get fastcgi to
go to the already create php-cgi proccesses by php-fpm instead of
creating new ones.
Thank you! :D
To unsubscribe from this group, send email to highload-php-en+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.