Advanced

Using Non Default Php Version On Plesk Server Cli

Posted by cshaw on · Post a comment
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

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments

No comments yet. Be the first.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post