php

php

Switches the PHP version. It will also restart the service.

Example

kusanagi php --use php81
kusanagi php

Options

(No options)

Optimizes PHP settings.
Execute this subcommand if you change the instance settings after setting up KUSANAGI.
If "php-fpm" is already running, it will restart "php-fpm".

PHP Version

[--use {installed | php84 | php83 | php82 | php81 | php80 | php74}]	
Discontinued options
--use php80 (discontinued as of 9.6.8 and Security Editon)
--use php74 (discontinued as of Security Editon)
--use php73 (discontinued as of 9.1.13)

Default: installed

Specifies the PHP version to be used. When one of the following PHP is specified, it will start up.
"--use", "--reload", "--test", "--status" and "--showpath" cannot be specified at the same time.

  • --use installed: currently installed php
  • --use php84: PHP 8.4
  • --use php83: PHP 8.3
  • --use php82: PHP 8.2
  • --use php81: PHP 8.1
  • --use php80 (discontinued as of 9.6.8 and Security Editon): PHP 8.0
  • --use php74 (discontinued as of Security Editon): PHP 7.4
  • --use php73 (discontinued as of 9.1.13): PHP 7.3

Reloading Configuration

[--reload]

Reloads configuration without disconnecting the session.
"--use", "--reload", "--test", "--status" and "--showpath" cannot be specified at the same time.

Checking Configuration File

[--test]

Checks the configuration files only.
"--use", "--reload", "--test", "--status" and "--showpath" cannot be specified at the same time.

Displaying Status

[--status]

Displays status of php-fpm.
"--use", "--reload", "--test", "--status" and "--showpath" cannot be specified at the same time.

Displaying Full Path of php Command

[--showpath]

Displays the full path of php command.
"--use", "--reload", "--test", "--status" and "--showpath" cannot be specified at the same time.

Output

# kusanagi php
php completed.
KUSANAGI
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.