Re: HTTPD and php-cgi
On 05/06/18 06:31, Duncan Patton a Campbell wrote: > On Sat, 5 May 2018 12:19:59 +0200 > Martijn van Duren wrote: > > On Sat, 5 May 2018 08:48:23 +0200 > Mischa Peters wrote: > > Hi Martijn, Mischa. Thanks for you replies, from which > I've figured out that the problem is I'm running sparc64 > and the packages you refer to are not extant... I guess > I'll have a go with ports and hopefully report back... sparc64 currently misses php-7.0, because of segfaults during the generation of phar, but php-5.6 is available. So if you `pkg_add php` you'll get the php-5.6 package which contains php-fpm. After that's installed you can run `rcctl start php56-fpm`. I have a patch in the pipeline that can disable the extensions based on architecture during compile-time which should allow us to have php-7.0 on sparc64 (without phar), but I don't have the hardware to test it. > > Thanks again. > > Dhu >
Re: HTTPD and php-cgi
On Sat, 5 May 2018 12:19:59 +0200 Martijn van Duren wrote: On Sat, 5 May 2018 08:48:23 +0200 Mischa Peters wrote: Hi Martijn, Mischa. Thanks for you replies, from which I've figured out that the problem is I'm running sparc64 and the packages you refer to are not extant... I guess I'll have a go with ports and hopefully report back... Thanks again. Dhu -- Je suis Canadien. Ce n'est pas Francais ou Anglaise. C'est une esp`ece de sauvage: ne obliviscaris, vix ea nostra voco;-) http://babayaga.neotext.ca/PublicKeys/Duncan_Patton_a_Campbell_pubkey.txt
Re: HTTPD and php-cgi
Hello Duncan, On 05/05/18 03:23, Duncan Patton a Campbell wrote: > > I am looking for documentation on running php-cgi-5.6 under the bsd httpd > server. > > From what I can tell, the function of php-fastcgi has been subsumed to > php-cgi-5.6, > but further than that I can find little or no salient documentation. Any > pointers > would be appreciated. > > Thanks, > > Dhu > This is exactly the reason why php-fastcgi was renamed to php-cgi. The old php-fastcgi contained what normally is normally called the php-cgi binary, which also contains *some* fastcgi functionality, but is *not* the recommended way to run php in fastcgi mode. The recommended way to run php in fastcgi mode is php-fpm, which is included in in the php main package. You can start this daemon by running `rcctl start php${PHP_VERSION}_fpm`. This will make php-fpm listen on its socket which can be set via the listen statement in /etc/php-fpm.conf (by default it's /var/www/run/php-fpm.sock). Once you have php-fpm up and running you can connect to it through httpd through the "fastcgi socket /run/php-fpm.sock" command in the appropriate "location" block from. See httpd.conf(5) for more information. Hope this helps. martijn@
Re: HTTPD and php-cgi
> On 5 May 2018, at 03:23, Duncan Patton a Campbell wrote: > > > I am looking for documentation on running php-cgi-5.6 under the bsd httpd > server. > > From what I can tell, the function of php-fastcgi has been subsumed to > php-cgi-5.6, > but further than that I can find little or no salient documentation. Any > pointers > would be appreciated. Hi Duncan, Everything you need to know is in a README when you install the pkg. $ less /usr/local/share/doc/pkg-readmes/php-7.0.28 Unfortunately the php example has been removed from /etc/examples/httpd.conf But you need something like the following in your httpd.conf: server "default" { listen on $ext_addr port 80 location "/.well-known/acme-challenge/*" { root { "/acme", strip 2 } } location "*.php" { fastcgi socket "/run/php-fpm.sock" } root "/htdocs/default" } Mischa
HTTPD and php-cgi
I am looking for documentation on running php-cgi-5.6 under the bsd httpd server. >From what I can tell, the function of php-fastcgi has been subsumed to >php-cgi-5.6, but further than that I can find little or no salient documentation. Any pointers would be appreciated. Thanks, Dhu -- Je suis Canadien. Ce n'est pas Francais ou Anglaise. C'est une esp`ece de sauvage: ne obliviscaris, vix ea nostra voco;-) http://babayaga.neotext.ca/PublicKeys/Duncan_Patton_a_Campbell_pubkey.txt