Summer of WordPress 2010: Act I
Mar 21, 2010
Guyub adalah perusahaan TI berpusat di Palembang dengan fokus pada F/OSS Produk-produk >> Layanan-layanan >>
Mar 21, 2010
Mar 21, 2010
Mar 16, 2010
Mar 16, 2010
Mar 13, 2010
Mar 13, 2010
Mar 12, 2010
I gave my second talk at #ConFoo today, this one was on Searching without the Database. This talk was based on a situation at work where I replaced a MySQL search solution with a Sphinx + Memcached solution for higher performance. If you’re interested, here’s the slides: Search without the DB – ConFoo 2010.pdf.
If you attended my talk, you can rate it on the Joind.in Page
Mar 12, 2010
After showing you how to set up
The Debian setup is painless:
The open source version of Redhat’s operating system does not provide
Assuming phpfarm is installed in /root/phpfarm,
After mod_fastcgi is available, we need to prepare the FastCGI
For each single php version you installed with
If you followed all of the previous steps, everything is
With the simple steps listed above and the help of phpfarm,
As as side note: The CGI versions of PHP are only used on the vhosts
multiple PHP versions on a single
machine, it’s time to explain how to stuff all those compiled
php-cgi executables into a single Apache web server instance.
Idea
to be utilized.
Installation of FastCGI
Debian
aptitude install libapache2-mod-fastcgi apache2-mpm-worker apache2-suexec
a2enmod actions fastcgi suexec
CentOS
the fastcgi module for Apache, which is why one needs to install it
by hand. It’s trivial.
you need to chmod +x /root. Last but not least is
setting up permissions for the fastcgi state files:
chmod +x /var/log/httpd.
FastCGI setup
servers. Open /etc/{apache2,httpd}/{apache2,httpd}.conf
and make it load conf/php-cgisetup.conf before including
server.conf. Put the following
lines into conf/php-cgisetup.conf:
#php-cgi setup
#used for multiple php versions
FastCgiServer /var/www/cgi-bin/php-cgi-5.2.12
FastCgiServer /var/www/cgi-bin/php-cgi-5.3.0
FastCgiServer /var/www/cgi-bin/php-cgi-5.3.1
ScriptAlias /cgi-bin-php/ /var/www/cgi-bin/
PHP-CGI setup
phpfarm,
you need to create a file
/var/www/cgi-bin/php-cgi-$version and make
it executable. Example for php-cgi-5.3.2:
#!/bin/sh
PHPRC="/etc/php5/cgi/5.3.2/"
export PHPRC
PHP_FCGI_CHILDREN=3
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /root/phpfarm/inst/bin/php-cgi-5.3.2
Activating a PHP version in a virtual host
setup now and ready to be used. In your
/etc/{apache2,httpd}/conf/server.conf, put the following
code in each
like to switch to a certain version of PHP:
Conclusion
you are able to test your web applications in a dozens or more
PHP versions easily.
that you determine. All others are still served by mod_php
that was probably setup before, making it trivially easy to keep your
server’s main web sites up-to date with your distribution’s
package manager.
Mar 12, 2010