HEX
Server: Apache/2.4.63 (Unix)
System: Linux Synopilou92 4.4.302+ #72806 SMP Mon Jul 21 23:16:00 CST 2025 x86_64
User: pilou92 (1026)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /volume1/@appstore/WebStation/ui/help/enu/application_webserv_php.html
<!DOCTYPE html>
<html class="img-no-display">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link href="../../../../help/help.css" type="text/css" rel="stylesheet"  />
<link href="../../../../help/scrollbar/flexcroll.css" type="text/css" rel="stylesheet"  />
<script type="text/javascript" src="../../../../help/scrollbar/flexcroll.js"></script>
<script type="text/javascript" src="../../../../help/scrollbar/initFlexcroll.js"></script>
</head>
<body><h1>Script Language Settings</h1>

<p>The <b>Script Language Settings</b> page provides advanced interactions of your websites. You can customize multiple environments by creating different profiles.</p>

<h2>Contents</h2>

<ul>
    <li><a href="#t1">PHP</a></li>
    <li><a href="#t2">Python</a></li>
</ul>

<h2 class="list_head"><a name="t1" id="t1"></a>PHP</h2>

<p>At the <b>PHP</b> tab, you can manage two types of PHP profiles:</p>
<ul>
  <li><b>Package-Based Profiles</b>: Profiles under this category are automatically created once service packages are installed. These profiles can be edited but cannot be deleted, and can only apply to their corresponding service packages.</li>
  <li><b>Customized Profile</b>: Profiles that can be created, edited, and deleted by users.</li>
</ul>

<h4 class="list_head">To create a customized profile:</h4>
<ol>
  <li>Click <b>Create</b>.</li>
  <li>Fill in the <b>Profile name</b> and <b>Description</b> fields for this profile.</li>
  <li>Select a PHP back-end version from the <b>PHP version</b> drop-down menu.</li>
  <li>Configure your profile settings at the following tabs:
    <ul>
      <li><a href="#s1">Settings</a>: General settings for the profile, such as PHP caches, Xdebug, and error messages.</li>
      <li><a href="#s2">Extensions</a>: Enable or disable extensions available in the profile.</li>
      <li><a href="#s3">FPM</a>: Adjust the settings of PHP FastCGI Process Manager (FPM).</li>
      <li><a href="#s4">Core</a>: Configure the php.ini directives of the profile.</li>
    </ul>
  </li>
<li>Confirm the settings and click <b>Create</b>.</li>
</ol>


<h4 class="list_head"><a name="s1" id="s1"></a>To edit the general settings:</h4>
<p>At the <b>Settings</b> tab, you can configure various general settings, including PHP caches, Xdebug, error message display, and open_basedir.</p>
<ol>
  <li>On the <b>Script Language Settings</b> page, select a PHP profile and click <b>Edit</b>, or double-click on a PHP profile.</li>
  <li>Go to the <b>Settings</b> tab.</li>
  <li>Configure the following settings according to your needs:
    <ul>
      <li><b>Enable PHP cache</b>: Tick this checkbox if you want to enhance PHP performance. However, it may not take effect under some circumstances.</li>
      <li><b>Enable Xdebug</b>: Tick this checkbox if you want to enable Xdebug, which is a PHP extension that provides debugging capabilities.</li>
      <li><b>Enable display_errors to display PHP error message</b>: Tick this checkbox if you want to display PHP error messages on the webpage.</li>
      <li><b>open_basedir</b>: The open_basedir function indicates the paths from which PHP is allowed to access files. 
		  <ul>
		  <li>Select <b>Customized</b> and fill in the path in the text field to customize open_basedir.</li>
		  <li>Select <b>Default</b> to use the system default settings.</li> 
		  </ul>
	</li>
    </ul>
  </li>
  <li>Click <b>Save</b> to apply the settings.</li>
</ol>

<div class="section"><h4>Note:</h4>
  <ul>
    <li>Use a colon (:) to separate each path for your open_basedir, such as <b>/etc:/tmp:/usr/bin/php</b>.</li>
    <li>For security reasons, paths for the <b>homes</b> shared folder (e.g., <b>/volume1/homes</b>) cannot be added to open_basedir.</li>
  </ul>
</div>

<h4 class="list_head"><a name="s2" id="s2"></a>To edit the extensions:</h4>
<p>At the <b>Extensions</b> tab, you can customize your profiles by managing extensions, such as bz2, curl, dba, gd, pgsql, session, and sqlite3. </p>
<ol>
  <li>On the <b>Script Language Settings</b> page, select a PHP profile and click <b>Edit</b>, or double-click on a PHP profile.</li>
  <li>Go to the <b>Extensions</b> tab.</li>
  <li>Tick the checkboxes of the extensions you want to enable on the extension list. </li>
  <li>Click <b>Save</b> to apply the settings.</li>
</ol>

<div class="section"><h4>Note:</h4>
  <ul>
    <li>Each package-based profile has one or more required extensions. The checkboxes of the required extensions are unavailable and cannot be ticked. Only the non-required extensions can be managed.</li>
  </ul>
</div>


<h4 class="list_head"><a name="s3" id="s3"></a>To edit the FPM settings:</h4>
<p>At the <b>FPM</b> tab, you can adjust the settings of PHP FastCGI Process Manager (FPM), which is an alternative PHP FastCGI implementation with features for heavy-loaded sites. </p>
<ol>
  <li>On the <b>Script Language Settings</b> page, select a PHP profile and click <b>Edit</b>, or double-click on a PHP profile.</li>
  <li>Go to the <b>FPM</b> tab.</li>
  <li>Modify the following values according to your needs:
    <ul>
      <li><b>FPM mode</b>: You can set the FPM mode to <b>Dynamic</b>, <b>Static</b>, or <b>On demand</b>.</li>
      <li><b>Max processes</b></li>
      <li><b>Start servers</b></li>
      <li><b>Min spare servers</b></li>
      <li><b>Max spare servers</b></li>
    </ul>
  </li>
  <li>Click <b>Save</b> to apply the settings.</li>
</ol>

<div class="section"><h4>Note:</h4>
  <ul>
    <li>Refer to the <a href="http://php.net/manual/install.fpm.configuration.php" target="_blank">PHP official website</a> for more information on FPM settings.</li>
  </ul>
</div>

<h4 class="list_head"><a name="s4" id="s4"></a>To edit the core settings:</h4>
<p>The <b>Core</b> tab contains all php.ini directives of your PHP profiles, such as <b>sendmail_path</b> and <b>sendmail_from</b>. </p>
<ol>
  <li>On the <b>Script Language Settings</b> page, select a PHP profile and click <b>Edit</b>, or double-click on a PHP profile.</li>
  <li>Go to the <b>Core</b> tab.</li>
  <li>Find a php.ini directive that you want to edit. You can enter its name into the search bar.</li>
  <li>Edit the value in the right column of the specified directive.</li>
  <li>Click <b>Save</b> to apply the settings.</li>
</ol>

<h4 class="list_head">To reset the php.ini values:</h4>
<ol>
  <li>On the <b>Script Language Settings</b> page, select a PHP profile and click <b>Edit</b>, or double-click on a PHP profile.</li>
  <li>Go to the <b>Core</b> tab.</li>
  <li>Select <b>Customized</b> from the drop-down menu. You will see all the php.ini directives you have modified.</li>
  <li>Do either of the following to reset php.ini values:
    <ul>
      <li><b>Reset selected</b>: Click on a php.ini and select <b>Reset selected</b> from the drop-down menu. You can also select more than one php.ini using the <b>Ctrl</b> key.</li>
      <li><b>Reset all</b>: Select <b>Reset all</b> from the drop-down menu.</li>
    </ul>
  </li>
  <li>Click <b>Save</b> to apply the settings.</li>
</ol>


<h2 class="list_head"><a name="t2" id="t2"></a>Python</h2>

<p>At the <b>Python</b> tab, you can manage customized profiles that can be created, edited, and deleted.</li>

<h4 class="list_head">To create a customized profile:</h4>
<ol>
  <li>Click <b>Create</b>.</li>
  <li>Fill in the <b>Profile name</b> and <b>Description</b> fields for this profile.</li>
  <li>Select a Python back-end version from the <b>Python version</b> drop-down menu and click <b>Next</b>.</li>
  <li>Set up uWSGI by filling in the following information, and then click <b>Next</b>. 
	 <ul>
      <li><b>Process</b>: The number of processes that uWSGI can simultaneously activate. </li>
      <li><b>Enable threads</b>: Each process contains one thread by default. Enable this option to allow a process to contain multiple threads.</li>
		<li><b>Number of threads</b>: The number of threads running a single process.</li>
		<li><b>Max. request count</b>: Processes will restart after the maximum number of requests is reached.</li>
		<li><b>Buffer size (bytes)</b>: The buffer size for each request's headers.</li>
    </ul>
 </li>
<li>Add Python modules by using the search bar, or by clicking the <b>Browse</b> button to upload a requirements file (<a href="#s10">requirements.txt</a>) from local storage. Click <b>Next</b>.
<ul>
<li><b>Module Name</b>: The name of the module.</li>	
<li><b>Default Version</b>: You can use the <b>Latest</b> version or <b>Customize</b> a module version</a>. For example:
            <ul>
                <li><i>Project_name</i></li>
                <li><i>Project_name == 1.3</i></li>
                <li><i>Project_name >=1.2,<2.0</i></li>
                <li><i>Project_name[foo, bar]</i></li>
				<li><i>Project_name~=1.4.2</i></li>
            </ul>	
  </li>	
<li><b>Action</b>: Click <img src="../images/script/red.png" width="20" height="20" alt="" class="inline"/> to remove a module.</li>
</ul>	
</li>
<li>Confirm the settings and click <b>Create</b>.</li>
</ol>


<div class="section"><a name="s10" id="s10"></a><h4>Note:</h4>
  <ul>
    <li>The format of a requirements.txt file must follow the format of a requirement specifier, which is composed of a project name followed by optional <a href="https://packaging.python.org/en/latest/glossary/#term-Version-Specifier" target="_blank">version specifiers</a>. Refer to the <a href="https://pip.pypa.io/en/stable/cli/pip_install/#requirement-specifiers" target="_blank">pip official document website</a> for more information on requirement specifiers.</li>
  </ul>
</div>

<h4 class="list_head"><a name="s4" id="s4"></a>To edit the general settings:</h4>
<p>At the <b>Settings</b> tab, you can edit the general settings. </p>
<ol>
  <li>On the <b>Script Language Settings</b> page, select a Python profile and click <b>Edit</b>, or double-click on a Python profile.</li>
  <li>Go to the <b>Settings</b> tab.</li>
  <li>Edit the profile name, description, and Python version according to your needs.</li>
  <li>Click <b>Save</b> to apply the settings.</li>
</ol>


<h4 class="list_head"><a name="s5" id="s5"></a>To edit the uWSGI settings:</h4>
<p>At the <b>uWSGI</b> tab, you can adjust the settings of Python uWSGI, which is an alternative Python uWSGI implementation with features for heavy-loaded sites. </p>
<ol>
  <li>On the <b>Script Language Settings</b> page, select a Python profile and click <b>Edit</b>, or double-click on a Python profile.</li>
  <li>Go to the <b>uWSGI</b> tab.</li>
  <li>Edit the following values according to your needs:
    <ul>
      <li><b>Process</b>: The number of processes that uWSGI can simultaneously activate. </li>
      <li><b>Enable threads</b>: Each process contains one thread by default. Enable this option to allow a process to contain multiple threads.</li>
		<li><b>Number of threads</b>: The number of threads running a single process.</li>
		<li><b>Max. request count</b>: Processes will restart after the maximum number of requests is reached.</li>
		<li><b>Buffer size (bytes)</b>: The buffer size for each request's headers.</li>
    </ul>
  </li>
<li>Click <b>Save</b> to apply the settings.</li>
</ol>

<div class="section"><h4>Note:</h4>
  <ul>
    <li>Refer to the <a href="https://uwsgi-docs.readthedocs.io/en/latest/Options.html?highlight=options" target="_blank">uWSGI official document website</a> for more information on uWSGI settings.</li>
  </ul>
</div>


<h4 class="list_head"><a name="s6" id="s6"></a>To edit the modules:</h4>
<p>At the <b>Module</b> tab, you can customize your profiles by managing modules, such as Flask and Django. </p>

<ol>
  <li>On the <b>Script Language Settings</b> page, select a Python profile and click <b>Edit</b>, or double-click on a Python profile.</li>
  <li>Go to the <b>Module</b> tab.</li>
<li>Manage Python modules by using the search bar or by clicking the <b>Browse</b> button to upload a requirements file (<a href="#s11">requirements.txt</a>) from local storage.
<ul>
<li><b>Module Name</b>: The name of the module.</li>	
<li><b>Default Version</b>: Select <b>Latest</b> to use the latest version or select <b>Customize</b> to customize a module version. For example:
            <ul>
                <li><i>Project_name</i></li>
                <li><i>Project_name == 1.3</i></li>
                <li><i>Project_name >=1.2,<2.0</i></li>
                <li><i>Project_name[foo, bar]</i></li>
				<li><i>Project_name~=1.4.2</i></li>
            </ul>	
</li>	
<li><b>Action</b>: Click <img src="../images/script/red.png" width="20" height="20" alt="" class="inline"/> to remove a module.</li>
</ul>	
</li>
		
  <li>Click <b>Save</b> to apply the settings.</li>
</ol>

<div class="section"><a name="s11" id="s11"></a><h4>Note:</h4>
  <ul>
    <li>The format of a requirements.txt file must follow the format of a requirement specifier, which is composed of a project name followed by optional <a href="https://packaging.python.org/en/latest/glossary/#term-Version-Specifier" target="_blank">version specifiers</a>. Refer to the <a href="https://pip.pypa.io/en/stable/cli/pip_install/#requirement-specifiers" target="_blank">pip official document website</a> for more information on requirement specifiers.</li>
  </ul>
</div></body>
</html>