TutorialsISPConfig

Setting and Modifying PHP Directives on VPS Servers with ISPConfig Panel.

This tutorial presents the addition and modification of PHP directives on VPS servers with the ISPConfig control panel.

Views 325Updated 2 aniPublished on 23/11/2022by Alexandru Rogojan

Introduction

  • The ISPConfig panel offers the ability to change and/or set values for the most common PHP directives, using a file named .user.ini from the root directory of the site for which we want to make changes.

Requirements

  • The FTP access data. An FTP account can be created by following the tutorial: Creating FTP User in ISPConfig panel;
  • The ISPConfig panel administration data received in the email inbox associated with the Hostico account when the VPS was activated.

Steps to follow

  • Using the FTP connection details we will connect to the server to modify/add files.

As an example, in the image above, we used the FTP client FileZilla. A tutorial related to accessing files with this client can be found at the following link Accessing files through Filezilla;

In the connection fields of Filezilla, we will enter the data as follows:

  • In "Host" we will enter the IP or the hostname of the VPS (it will work with the hostname only if the hostname domain has the VPS's custom nameservers set at the registrar);
  • In the "Username" and "Password", we will enter the user and password of the FTP account created in the ISPConfig panel, according to the tutorial mentioned in "Requirements";
  • In the "Port" field, we will use 21.

After connecting, we access the main directory of our website, where we will create a file named "user.ini";

We can find the root directory of the site we are working with by accessing the ISPConfig Control Panel -> Sites tab in the navigation menu -> click on Websites, Subdomain, or Alias as appropriate -> Click on the domain in question -> on the domain tab in the Document Root field, we will have the path to the domain's root directory;

In the FTP client used, we will navigate to this path and further enter the "web" directory. For example, a complete path to the root directory will look like this: "/var/www/clients/client1/web1/web";

Next, to modify the PHP directives, we will create a file named ".user.ini" (locally on the computer), in which we will set the desired directives. After saving the file, we will upload it to the directory mentioned above using the FTP client;

Some examples of directives that can be modified are presented below:

allow_url_fopen = off
display_errors = false
log_errors = off
date.timezone = Europe/Bucharest
error_log = php_errors.log
error_reporting = E_ALL & ~E_NOTICE
max_execution_time = 300
max_input_time = 300
max_input_vars = 2000
memory_limit = 512M
post_max_size = 500M
upload_max_filesize = 500M
opcache.enable = on 

The directives with the current set values can be checked using the php function "phpinfo()". If you notice that a particular directive is not changing, please contact technical support.

Similar Articles

Unblocking the IP from Hostico serversTutorials /Dev

In this tutorial, the necessary steps will be presented to unblock the IP listed in the firewall on Hostico servers.

31
by Mark Dohi
Views 933
Updated 20 days ago
Published on 05/10/2020
Setting up the contact form via SMTP in WordPressTutorials /WordPress

Configure the contact form in WordPress via SMTP with this simple guide. Follow the steps for installing and setting up the WP Mail SMTP plugin.

5
by Cătălin Adrian
Views 5360
Updated 3 months ago
Published on 01/10/2019
Apache and Nginx settings in PleskTutorials /Plesk

Easily modify Apache and Nginx settings in Plesk. Learn how to configure MIME types and manage caching for an optimized server.

by Florin Petran
Views 356
Updated 20 days ago
Published on 24/04/2019
Adding an FTP account in the ISPConfig control panel.Tutorials /ISPConfig

This tutorial explains the necessary steps for adding a new FTP account in the ISPConfig administration panel, which will allow file uploads to the server.

by Ştefan Tracsek
Views 288
Updated 2 months ago
Published on 28/11/2022
Creating an FTP user in Plesk with limited access to filesTutorials /Plesk

Learn how to create an FTP user with limited access in Plesk by following the simple steps for setting up the account and managing files.

by Cătălin Adrian
Views 244
Updated 20 days ago
Published on 17/12/2019