Using Non Default Php Version On Plesk Server Cli

Posted by cshaw on Feb 6, 2020 2:15 AM EDT
Chrstopher Shaw Portfolo; By Christopher Shaw
Mail this story
Print this story

Using Non Default Php Version On Plesk Server Cli

Plesk is a tool for managing multiple websites with their own settings including PHP. But comes with alot of caveats, especially with configuration. Recently I needed to run a PHP a script as 7.2, but the OS Default is 5.6 so plesk kept forcing the script to run as 5.6.

To run the script as the desired version, had to pass the PHP version as an Enviroment Variable to force any subshells to use the correct PHP version.

env “PATH=/opt/plesk/php/7.2/bin:$PATH” php script.php

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Debian, PHP, Ubuntu

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.