Re: apache22 + php5 (package not ports) ~ spawn-fcgi ?
On 22/02/2012 05:13, alexus wrote: thank you for your respond - that's my plan b i'd like to know if i can exercise my plan a first: i already have installed apache22, php5 as package (pkg_add) without having them build through /usr/ports (i know how everyone likes ports around here). i want to see if it's possible to have a link between apache22 and php5 with using packages only (i.e. without /usr/ports) and since mod_php is mia for whatever reason(s) i want to see if fastcgi can be used and PHP-FPM isn't available in packages too (i'm start thinking packages sucks comparing to /usr/ports) basically my last resort (at least that i know of to try) is to go with spawn-fcgi. i dont have alot of requirements but i do need apache22 + php5 to talk to each others and i want to know if it can be done with pkg_add vs /usr/ports It is true that packages are really quite lacking compared to ports. I doubt that it would ever be possible to create pre-compiled packages that provide the same level of flexibility and configurability as you get with ports, but that doesn't mean there are not a large number of improvements that could be made. That packages are not really up to the required standard is well known amongst FreeBSD users, but somehow always seems to come as an unpleasant surprise to new users. If there is a certain detectable note of asperity in the way we say just use the ports -- it's easy, and fun for all the family that's because we keep on having to say the same thing over and over. Eventually we'll get fed up with telling people there's no demand, and provide a pkg system more in line with their expectations. Moves are already afoot -- http://wiki.freebsd.org/pkgng -- but it's going to take some time before that has any material effects on end-user experience. As to your specific problem: yes, it is a cause of contention that mod_php is not enabled in the default php5 package. I don't entirely understand why the port maintainer made that decision. php-fpm is not enabled by default either, because it is still considered experimental code in the currently available php5-5.3.10_1 -- I read that it will no longer be considered experimental in php 5.4 but you're going to have to wait until that gets released. Have you considered nginx + spawn-fcgi? Or lighttpd (with its built-in fastcgi support)? I think those should work entirely through available packages, and should be at least competitive in performance with apache + whatever-PHP. Usually nginx or lighttpd pretty much smoke apache performance-wise, but they are lot simpler and much smaller applications so not quite as capable of doing everything apache can. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: apache22 + php5 (package not ports) ~ spawn-fcgi ?
On Feb 21, 2012, at 5:14 PM, alexus wrote: is there a way to make apache22 w/ php5 without using /usr/ports? Yes, you could download and build the sources yourself without using ports. It wouldn't be any faster or easier, though. just using pkg_add -r apache22 pkg_add -r php5 No. The precompiled php5 package doesn't come with mod_php Apache module, in part because there are many apache versions against which it might be compiled. maybe through spawn-fcgi somehow? I suppose, or just normal CGI mechanism. anyone have a good example/docs how to do it? http://www.fastcgi.com/drupal/node/6 Regards, -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: apache22 + php5 (package not ports) ~ spawn-fcgi ?
I dont think you really grasping what I was asking.. I am aware that I can build from source, yet I'm trying to stay away from that route due to a lot of overhead going forward... I'm also aware that php5 or actually apache22 doesn't come with mod_php as well, and as alternative I'm willing to go spawn-fcgi route instead, and this is what I'm interested in. I'm looking for some blog/howtos of people already done it on freebsd and not just a general fastcgi.com site :) So, if anyone have an experience or know a good resources that may be useful for me at this point of time, I'd highly appreciate if you can post it here. Thank you in advance. On Tue, Feb 21, 2012 at 8:20 PM, Chuck Swiger cswi...@mac.com wrote: On Feb 21, 2012, at 5:14 PM, alexus wrote: is there a way to make apache22 w/ php5 without using /usr/ports? Yes, you could download and build the sources yourself without using ports. It wouldn't be any faster or easier, though. just using pkg_add -r apache22 pkg_add -r php5 No. The precompiled php5 package doesn't come with mod_php Apache module, in part because there are many apache versions against which it might be compiled. maybe through spawn-fcgi somehow? I suppose, or just normal CGI mechanism. anyone have a good example/docs how to do it? http://www.fastcgi.com/drupal/node/6 Regards, -- -Chuck -- http://alexus.org/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: apache22 + php5 (package not ports) ~ spawn-fcgi ?
alexus wrote: I dont think you really grasping what I was asking.. I am aware that I can build from source, yet I'm trying to stay away from that route due to a lot of overhead going forward... I'm also aware that php5 or actually apache22 doesn't come with mod_php as well, and as alternative I'm willing to go spawn-fcgi route instead, and this is what I'm interested in. I'm looking for some blog/howtos of people already done it on freebsd and not just a general fastcgi.com site :) So, if anyone have an experience or know a good resources that may be useful for me at this point of time, I'd highly appreciate if you can post it here. You do not need spawn-fcgi wrt to PHP. I install software by compiling through the ports system, as it is just so much more maintainable in the long run. Also, you are more able to select build options which are better suited to your needs and environment. I have built Apache outside the ports tree in the long-ago past, so I do understand how. It's just there really is not a great reason to do so. In my case, I utilize the apache-event MPM in conjunction with FastCGI. Originally I began with mod_fcgi, and it seemed to work well. When I learned that mod_fastcgi was supposed to work better with PHP-FPM I switched to it when I made the change to PHP-FPM. PHP-FPM runs on it's own at boot and has it's own startup scripts. You can set the options to do this when you build the base PHP port by choosing WITH_CLI=true, WITH_CGI=true, WITH_FPM=true and you will not need spawn- fcgi; PHP-FPM supplies this functionality [e.g 'long-running process'] by design. Also there is a .conf you can use to adjust your PHP CGI pools in a much more granular way than with spawn-fcgi. Irregardless of which MPM you run Apache with, the next step is to connect Apache through mod_fastcgi to these running instance(s) of PHP. Here is an example from httpd.conf for this: [...] LoadModule fastcgi_module libexec/apache22/mod_fastcgi.so [...] IfModule mod_fastcgi.c Alias /php-cgi /usr/local/www/fastcgi/php-cgi #FastCGIExternalServer /usr/local/www/fastcgi/php-cgi -flush -host 127.0.0.1:9000 FastCGIExternalServer /usr/local/www/fastcgi/php-cgi -flush -socket /tmp/php- fm.sock AddType application/x-httpd-php .php Action application/x-httpd-php /php-cgi Directory /usr/local/www/fastcgi/ Order deny,allow Deny from all Files php-cgi Order allow,deny Allow from all /Files /Directory /IfModule Notice I use a socket, and this socket is configured in the php-fpm.conf. The normal default is to use the TCP loopback. This also is probably not the best config available, but it supplies my very basic needs. If you are trying to set up Apache with mod_fastcgi, go with PHP-FPM as your CGI version of the PHP port build (set in the make config options) and it will be easy. IMHO this is a better way to go than spawn-fcgi, especially wrt to PHP specifically. --Mike ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: apache22 + php5 (package not ports) ~ spawn-fcgi ?
thank you for your respond - that's my plan b i'd like to know if i can exercise my plan a first: i already have installed apache22, php5 as package (pkg_add) without having them build through /usr/ports (i know how everyone likes ports around here). i want to see if it's possible to have a link between apache22 and php5 with using packages only (i.e. without /usr/ports) and since mod_php is mia for whatever reason(s) i want to see if fastcgi can be used and PHP-FPM isn't available in packages too (i'm start thinking packages sucks comparing to /usr/ports) basically my last resort (at least that i know of to try) is to go with spawn-fcgi. i dont have alot of requirements but i do need apache22 + php5 to talk to each others and i want to know if it can be done with pkg_add vs /usr/ports On Wed, Feb 22, 2012 at 12:03 AM, Michael Powell nightre...@hotmail.com wrote: alexus wrote: I dont think you really grasping what I was asking.. I am aware that I can build from source, yet I'm trying to stay away from that route due to a lot of overhead going forward... I'm also aware that php5 or actually apache22 doesn't come with mod_php as well, and as alternative I'm willing to go spawn-fcgi route instead, and this is what I'm interested in. I'm looking for some blog/howtos of people already done it on freebsd and not just a general fastcgi.com site :) So, if anyone have an experience or know a good resources that may be useful for me at this point of time, I'd highly appreciate if you can post it here. You do not need spawn-fcgi wrt to PHP. I install software by compiling through the ports system, as it is just so much more maintainable in the long run. Also, you are more able to select build options which are better suited to your needs and environment. I have built Apache outside the ports tree in the long-ago past, so I do understand how. It's just there really is not a great reason to do so. In my case, I utilize the apache-event MPM in conjunction with FastCGI. Originally I began with mod_fcgi, and it seemed to work well. When I learned that mod_fastcgi was supposed to work better with PHP-FPM I switched to it when I made the change to PHP-FPM. PHP-FPM runs on it's own at boot and has it's own startup scripts. You can set the options to do this when you build the base PHP port by choosing WITH_CLI=true, WITH_CGI=true, WITH_FPM=true and you will not need spawn- fcgi; PHP-FPM supplies this functionality [e.g 'long-running process'] by design. Also there is a .conf you can use to adjust your PHP CGI pools in a much more granular way than with spawn-fcgi. Irregardless of which MPM you run Apache with, the next step is to connect Apache through mod_fastcgi to these running instance(s) of PHP. Here is an example from httpd.conf for this: [...] LoadModule fastcgi_module libexec/apache22/mod_fastcgi.so [...] IfModule mod_fastcgi.c Alias /php-cgi /usr/local/www/fastcgi/php-cgi #FastCGIExternalServer /usr/local/www/fastcgi/php-cgi -flush -host 127.0.0.1:9000 FastCGIExternalServer /usr/local/www/fastcgi/php-cgi -flush -socket /tmp/php- fm.sock AddType application/x-httpd-php .php Action application/x-httpd-php /php-cgi Directory /usr/local/www/fastcgi/ Order deny,allow Deny from all Files php-cgi Order allow,deny Allow from all /Files /Directory /IfModule Notice I use a socket, and this socket is configured in the php-fpm.conf. The normal default is to use the TCP loopback. This also is probably not the best config available, but it supplies my very basic needs. If you are trying to set up Apache with mod_fastcgi, go with PHP-FPM as your CGI version of the PHP port build (set in the make config options) and it will be easy. IMHO this is a better way to go than spawn-fcgi, especially wrt to PHP specifically. --Mike ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- http://alexus.org/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: apache22 + php5 (package not ports) ~ spawn-fcgi ?
On Feb 21, 2012, at 5:31 PM, alexus wrote: I dont think you really grasping what I was asking.. With respect, of course I understand what you were asking. I am aware that I can build from source, yet I'm trying to stay away from that route due to a lot of overhead going forward... OK. You cannot expect someone else's precompiled binaries to precisely match your particular circumstances, so you're choosing to give that up in favor of convenience, but that is a reasonable decision if the value of configuring the webserver well for the site is less than the value of a few hours of your (or someone's) time. I'm also aware that php5 or actually apache22 doesn't come with mod_php as well, and as alternative I'm willing to go spawn-fcgi route instead, and this is what I'm interested in. OK. I'm looking for some blog/howtos of people already done it on freebsd and not just a general fastcgi.com site :) You haven't indicated anything so far which would suggest the general documentation was insufficient. What have you tried? So, if anyone have an experience or know a good resources that may be useful for me at this point of time, I'd highly appreciate if you can post it here. With respect, I can recall when Brian Behlendorf and Andrew Wilson and some other folks started collecting a bunch of patches to the NCSA webserver, which became known as Apache-0.60 back around 1994, and later was publicly released in 1995 as Apache-0.70 or so. Well, there are other folks who deal with webservers at sites for which the cost of downtime is measured in the millions of dollars per hour from whom you can seek advice Regards, -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org