PHP Support
note
Additional software is required to run PHP scripts on your server. This is not included in the default installation.
McWebserver supports PHP. This means you can run PHP scripts on your server.
To enable PHP support, set web.php
to true
in the mcwebserver.properties
file.
config/mcwebserver.properties
web.php=true # enable php | default: false
After enabling PHP support, you can create PHP files in the webserver
directory. These files will be executed by the PHP interpreter.
To install the php interpreter, you can use the following command:
- Linux
- Windows
- apt
- yum
- pacman
- dnf
sudo apt install php
sudo yum install php
sudo pacman -S php
sudo dnf install php
Download the PHP installer from the official website and follow the installation instructions.
info
Make sure the php executable is in your PATH. To check if PHP is installed correctly, run php -v
in your terminal.