Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Pavel Shevaev’s Blog: Make php-fpm execute arbitrary PHP scripts via socket

Pavel Shevaev’s Blog: Make php-fpm execute arbitrary PHP scripts via socket

Pavel Shevaev has a quick new post to his blog showing how to get PHP-FPM to execute PHP scripts via a socket request.

We are using APC cache very heavily in our projects and during project deployment the cache must be flushed and warmed up. A common solution to warmup the APC cache is to fetch some special page via HTTP which does the job. The problem with this approach is that it’s not reliable enough when PHP is served via several fastcgi back-ends.

To solve the problem, he uses a PHP-FPM module to work with the FastCGI socket and execute any file (as permissions allow, of course). In his case, he uses it to “warm up” his APC cache for the user. A code snippet is provided as an example.

Source: http://www.phpdeveloper.org/news/17045

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Posted Październik 27th, 2011 in WEB and PHP Development.

Leave a response: