Skip to content

Instantly share code, notes, and snippets.

@gvoze32
Last active January 16, 2023 15:00
Show Gist options
  • Select an option

  • Save gvoze32/c3f5eed8c7ab31455b4bdf1e9bb82bdd to your computer and use it in GitHub Desktop.

Select an option

Save gvoze32/c3f5eed8c7ab31455b4bdf1e9bb82bdd to your computer and use it in GitHub Desktop.

Revisions

  1. gvoze32 revised this gist Jan 16, 2023. No changes.
  2. gvoze32 created this gist Oct 11, 2020.
    18 changes: 18 additions & 0 deletions auto_install_ioncube.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    #!/bin/bash
    curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
    tar -xvzf ioncube_loaders_lin_x86-64.tar.gz
    rm ioncube_loaders_lin_x86-64.tar.gz
    cd ioncube
    php_ext_dir="$(command php -i | grep extension_dir 2>'/dev/null' \
    | command head -n 1 \
    | command cut --characters=31-38)"
    php_version="$(command php --version 2>'/dev/null' \
    | command head -n 1 \
    | command cut --characters=5-7)"
    cp ioncube_loader_lin_${php_version}.so /usr/lib/php/${php_ext_dir}
    cd ..
    rm -rf ioncube
    cat > /etc/php/${php_version}/cli/conf.d/00-ioncube-loader.ini << EOF
    zend_extension=ioncube_loader_lin_${php_version}.so
    EOF
    php -v