Dec 072012

This is an article of mine first published on Wazi

PHP is a widely-used language, it offers general purpose scripting that is well suited for Web development. It can be embedded into HTML, and is compatible with all major operating systems such as Linux, many Unix variants, Microsoft Windows, Mac OS X, RISC OS and more.

It works with most major Web servers and it’s the scripting engine of many popular software such as Wordpess, Drupal, phpBB, mediaWiki, Joomla and Moodle just to name a few.

A thing that not everyone know is that you have different choice to run PHP on your Server, the most common option is the one used in the LAMP stack(Linux+Apache+Mysql+PHP): mod_php, this is the more common way to have php working with your web server, but is not the only one and for someone is the worst in terms of performance, other options available are PHP-FPM (FastCGI Process Manager) and PHP FastCGI, another way of running a PHP script from a webserver could be ti use the traditional CGI method but for its poor performance this method is not used anymore

In this article I’ll show you the pros and cons of these different ways to use PHP with your webserver and as first thing I’ll give you a general suggestion to speed up the performance of your PHP.
Continue reading »

flattr this!

Jul 072012

Sometimes is useful to sync automatically files over the net between 2 or more computers, maybe you want to keep some configuration files aligned on different servers or maybe you have a cluster of web servers and you want to keep their document root aligned so your customer will always see the same result.

You could do this with a network filesystem like NFS, GlusterFS or Coda File system.
But why do complicated things when you could easily do this just keeping in sync the local filesystem ?

In a former article I’ve talked about Unison to do a work like that, and it works, the limit of Unison is that you can have just 2 nodes, but if you have more nodes you have to use a different solution like the one i present you today: csync2

Continue reading »

flattr this!