Date: Tue, 1 Dec 2015 01:46:06 +0200 From: "Reko Turja" <reko.turja@liukuma.net> To: "Carmel NY" <carmel_ny@outlook.com>, "FreeBSD Ports" <freebsd-ports@freebsd.org> Subject: Re: Updating php Message-ID: <ADF013E1FA0646B6A71140CF0CF1ABB4@Rivendell> In-Reply-To: <BLU436-SMTP214762EB8B42AC45CFFFFB80000@phx.gbl> References: <BLU437-SMTP752532A53858F4F8BD617980000@phx.gbl> <565C464C.8070809@toco-domains.de> <BLU436-SMTP28F05C1E59BDCEFB610CF580000@phx.gbl> <565C567D.4020205@FreeBSD.org> <BLU436-SMTP214762EB8B42AC45CFFFFB80000@phx.gbl>
next in thread | previous in thread | raw e-mail | index | archive | help
> Thanks for the info. Can you tell me where I can find some > documentation on > how to set up "php-fpm" on a FreeBSD-10.2 system running "apache24"? As MAtthew said, this removes lots of hassle (and actually allows running of threaded Apache and php on top of each other without all kinds of interesting side effects) This is how I've done it based on sources from internet and then adjusting the sources into practise - tbh the amount of good how-to's on the subject is pretty minimal: First you need to load mod fcgi (and of course compile/install binary too) in httpd.conf like this (just add on the bottom of other LoadModules if not already there: LoadModule fcgid_module libexec/apache24/mod_fcgid.so For my applications I've had to set some other variables, the following is snippet of my httpd conf just after the LoadModules: FcgidFixPathinfo 1 FcgidMaxRequestLen 13107200 FcgidMaxProcessesPerClass 50 FcgidMaxRequestInMem 131072 FcgidIOTimeout 90 <IfModule fcgid_module> AddHandler fcgid-script .php Options +ExecCGI FcgidWrapper /usr/local/bin/php-wrapper .php </IfModule> As you see, we need a wrapper script in whatever directory we want, for sake of consistency I use /usr/local/bin. For my needs the contents of the wrapper shell script are very simply: #!/bin/sh # Set desired PHP_FCGI_* environment variables. # Example: # PHP FastCGI processes exit after 500 requests by default. PHP_FCGI_MAX_REQUESTS=1000 export PHP_FCGI_MAX_REQUESTS As we are running cgi from "page directories" we need to tell Apache that running CGI is "okay" (as there's always a risk involved, this you need to think yourself) from these, so: <Directory /your/web/homedir/here> ... Options ExecCGI ... ... </Directory> That's basically how to set the thing up and running. -Reko "
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ADF013E1FA0646B6A71140CF0CF1ABB4>