Enable Swoole Loader extension support for Linux virtual hosting.
Published: 2020-03-07
Special Note: This only installs support for the Swoole extension; the host does not have the server side installed. Currently supported versions: php5.4-php7.2.
1. Log in to the host control panel and find the [Remote File Download] feature.

2. For Remote Download File, enter http://download.myhostadmin.net/vps/SwooleLoader_linux.zip and for the download save path, enter /others/

3. Click [php version] in the control panel and select php5.3 or above. The example selects php5.5 (Note: php5.2 cannot edit php.ini, so you need to choose a version above).

4. Click [File Manager] in the control panel, open and enter the others directory, move the mouse over the compressed package just downloaded remotely, and click the extract button. The number in the extracted file name corresponds to the php version; for example, swoole_loader56.so is the extension file for php5.6.

5. Modify php.ini.
Create a new file locally and name it x.php
<?php
$str_ver=substr(phpversion(),0,3);
$phprc=$_SERVER['PHPRC'];
echo "extension=".$phprc."/swoole_loader".$str_ver.".so";
?>
Write the above code into it, then upload it to the wwwroot directory, then visit http://your-website-domain/x.php

Click to edit the php.ini file in the others directory, copy the content output above, add it to the bottom of the php.ini file and save, as shown in the illustration below.

Extension Conflict
Note: Please disable xdebug, ioncube loader, zend guard loader, and other extensions that affect PHP's low-level behavior.
For example, comment in php.ini:
;zend_extension=ioncube.so
6. Enter the wwwroot directory again, edit the x.php file, enter <?phpinfo()?> in it and save, then visit http://your-website-domain/x.php and search for swoole. If it can be found, the installation is successful. If it cannot be found, please check the operation steps or submit a ticket.

Related tutorial: https://www.west.cn/faq/list.asp?unid=2283 sg11 installation instructions.
