Re: PHP-FPM: How to clear the realpath cache on deployment?

From: Date: Tue, 23 Jun 2015 10:17:13 +0000
Subject: Re: PHP-FPM: How to clear the realpath cache on deployment?
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-86806@lists.php.net to get a copy of this message
Hello, internals! I remember the crazy code for invalidating the opcache/realpath entries from CLI. Logic was the following: tool asks for the server name with php-fpm to connect to via ssh connection, then it prepares a small PHP-file and uploads it to the temp directory on this server and then connects directly to the php-fpm socket on this server via FCGI protocol (implemented in PHP) to issue an request to this temporary file. So, it's possible to access all shared variables/states in this php-fpm instance. After that it's possible to execute a command in the context of server. This can be used for invalidating the realapth/opcode cache. Hope, that this information can be useful for you ) Thanks 2015-06-22 23:27 GMT+03:00 Ferenc Kovacs <tyra3l@gmail.com>: > On Mon, Jun 22, 2015 at 9:26 PM, Sebastian Bergmann <sebastian@php.net> > wrote: > > > On 06/19/2015 05:46 PM, Rasmus Lerdorf wrote: > > > I think this is a symptom of doing deploys incorrectly. > > > > You are right, of course. Thank you for pointing out this layer 8 > > problem :-) No clue why I did it different (read: stupid) for a > > private project when I know better. Oh, well. > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > another alternative is using absolute paths everywhere: > > > http://grokbase.com/p/php/php-internals/133qxh5ndm/php-dev-continuous-integration-atomic-deploys-and-php-5-5 > > -- > Ferenc Kovács > @Tyr43l - http://tyrael.hu >

« previous php.internals (#86806) next »