namespace php
version
Show the php version on the server.
Usage
$ cap dev php:version
Output
Running /usr/bin/env php -v as vagrant@project.example
DEBUG Command: /usr/bin/env php -v
DEBUG PHP 5.3.10-1ubuntu3.15 with Suhosin-Patch (cli) (built: Oct 29 2014 12:19:04)
DEBUG Copyright (c) 1997-2012 The PHP Group
DEBUG Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
DEBUG with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
DEBUG Finished in 0.359 seconds with exit status 0 (successful).
INFO PHP 5.3.10-1ubuntu3.15 with Suhosin-Patch (cli) (built: Oct 29 2014 12:19:04)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
clear_apc_cache
Clears the APC PHP Cache on the server.
Configuration
set :remote_apc_file_name, 'apc_clear.php'
set :local_apc_file, File.join(__dir__, '..', '..', '..', 'vendor', 'apc_clear.php')
Usage
$ cap dev php:clear_apc_cache
Output
DEBUG Running /usr/bin/env [ -f /var/www/your-domain/current/./apc_clear.php ]
as vagrant@project.example
DEBUG Command: [ -f /var/www/your-domain/current/./apc_clear.php ]
DEBUG Finished in 0.275 seconds with exit status 1 (failed).
DEBUG Uploading dkdeploy-php-3.0.0/lib/capistrano/dkdeploy/../../../vendor/apc_clear.php 0.0%
INFO Uploading /dkdeploy-php-3.0.0/lib/capistrano/dkdeploy/../../../vendor/apc_clear.php 100.0%
INFO Call URL http://project.example/apc_clear.php
INFO Result 200 - OK
INFO Running /usr/bin/env rm -f /var/www/your-domain/current/./apc_clear.php
as vagrant@project.example
DEBUG Command: /usr/bin/env rm -f /var/www/your-domain/current/./apc_clear.php
INFO Finished in 0.006 seconds with exit status 0 (successful).
clear_opcache
Clears the PHP OPcache on the stage.
Configuration
set :remote_opcache_file_name, 'opcache_reset.php'
set :local_opcache_file, File.join(__dir__, '..', '..', '..', 'vendor', 'opcache_reset.php')
Usage
$ cap dev php:clear_opcache
Output
php:clear_opcache
Uploading /home/your-username/Documents/my-project/dkdeploy-php-6.0.0/lib/capistrano/dkdeploy/../../../vendor/opcache_reset.php 100.0%
Call URL http://project.example/opcache_reset.php
Result 200 - OK
rm -f /var/www/your-domain/current/./opcache_reset.php