set-php-directory

Set the version of PHP to run in some directory If more than one version of PHP is installed on your system and either CGI or fCGId is used to run PHP scripts in some virtual server, it can be configured to run a different PHP version on a per-directory basis. This is most useful when running PHP applications that only support specific versions. To set a PHP directory, the --domain flag must be used to specify the directory, --dir to set the path and --version to set the version number.

Set the version of PHP to run in some directory#

If more than one version of PHP is installed on your system and either CGI or fCGId is used to run PHP scripts in some virtual server, it can be configured to run a different PHP version on a per-directory basis. This is most useful when running PHP applications that only support specific versions.

To set a PHP directory, the --domain flag must be used to specify the directory, --dir to set the path and --version to set the version number.

For example:

virtualmin set-php-directory --domain example.com --dir /home/example/public_html/drupal --version 8.1

Command line help#

virtualmin set-php-directory --domain domain.name
 --dir directory|url-path|"."
 --version num

Source: https://www.virtualmin.com/docs/development/api-programs/set-php-directory/

  • virtualmin, php, cgi, drupal, domain, install, command line, script, directory
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Pre and Post Domain Modification Scripts

Virtualmin allows the use of custom scripts (Shell, Perl, Python and etc.) to automate tasks...

OS Support

Virtualmin runs on top of Webmin. Webmin works on almost every UNIX-like OS, so with some manual...

Professional Features

Virtualmin GPL is already an extremely powerful and flexible virtual hosting control panel, so...

How to Configure Secondary DNS

This guide provides administrators with a quick overview of setting up automatic DNS secondary...

How to Configure Cloudflare DNS

For users looking to integrate Cloudflare with Virtualmin Pro, the process is straightforward and...