IonCubeは、PHPファイルを保護およびエンコードするために使用されるPHPZendエンコード方式です。 VPSでエンコードされたphpファイルを表示するには、phpioncube拡張機能がインストールされている必要があります。
本日は、簡単なbashスクリプトを使用してDebianまたはUbuntuVPSにioncubeローダーをインストールする方法を説明します。
#!/usr/bin/env bash
# RoseHosting.com
# Check if PHP CLI is installed
hash php 2>/dev/null || { echo >&2 "The script requires php5-cli but it's not installed. Aborting."; exit 1; }
# Find the system architecture
DPKG_ARCH=$(dpkg --print-architecture)
if [[ "$DPKG_ARCH" = "i386" ]]; then
ARCH="x86"
elif [[ "$DPKG_ARCH" = "amd64" ]]; then
ARCH="x86-64"
fi
# Download and extract
wget -q -O - "http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_${ARCH}.tar.gz" | tar -xzf - -C /usr/local
# Find PHP version
PHP_V=$(php -v)
PHP_VERSION=${PHP_V:4:3}
# Add the IonCube loader to the PHP configuration
echo "zend_extension=/usr/local/ioncube/ioncube_loader_lin_${PHP_VERSION}.so" \
> '/etc/php5/conf.d/00-ioncube_loader.ini'
# Restart services
for i in php5-fpm nginx apache2;do
test -x /etc/init.d/$i && /etc/init.d/$i restart
done スクリプトを実行した後、ioncube拡張機能が正しくインストールされているかどうかを確認するには、次のコマンドを入力します:「php-v」。出力は次のようになります。
PHP 5.3.18-1~dotdeb.0 with Suhosin-Patch (cli) (built: Oct 19 2012 08:17:21)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd.
with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH このスクリプトは自明であり、UbuntuやLinuxMintなどのDebianベースのシステムで動作するはずです。
もちろん、Linux VPSホスティングサービスのいずれかを使用している場合は、これを行う必要はありません。その場合は、専門のLinux管理者にインストールを依頼するだけです。 24時間年中無休でご利用いただけます。リクエストはすぐに処理されます。
PS。 この投稿が気に入った場合は、左側のボタンを使用してソーシャルネットワーク上の友達と共有するか、下に返信を残してください。ありがとう。