Install Ioncube Loader For All PHP Modes (CLI, CGI, FCGI And FPM) On Debian Wheezy

In this tutorial I will explain the installation of Ioncube Loader on Debian Wheezy so that it can be used in all PHP Modes. If one of the php.ini files does not exist on your server, then this php mode is not installed and you can skip that php.ini file.
Download the latest ioncube loaders with wget and unpack the archive:
cd /tmp
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xfz ioncube_loaders_lin_x86-64.tar.gz

Move the loaders to /usr/local/ and clean up the /tmp directory
mv ioncube /usr/local/
rm ioncube_loaders_lin_x86-64.tar.gz

Configure PHP

Now edit the php.ini files with a editor like vi or nano:
For mod_php:
vi /etc/php5/apache2/php.ini

For CGI and FCGI PHP:
vi /etc/php5/cgi/php.ini

For PHP commandline scripts:
vi /etc/php5/cli/php.ini

For scripts running with PHP-FPM
vi /etc/php5/fpm/php.ini

and add the following line right at the beginning of the file(s) (before the [PHP] line):
zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.4.so
so the the resulting file looks like this:
zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.4.so
[PHP]

;;;;;;;;;;;;;;;;;;;
; About php.ini   ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
[…]
Finally restart apache to apply the changes:

service apache2 restart

When you use PHP-FPM, then restart the PHP-FPM pool daemon as well:
service php5-fpm restart

To test that the ioncube loader has been included in the PHP configuration of your website correctly, create a info.php test file with the following content and place it into the web directory of your site:
vi info.php

With the following content:
<?php
phpinfo();
?>

And open the URL in a web browser, you should see ioncube loader mentioned there:

Please do not forget to delete the info.php file when you dont need it anymore!

Read more

How to migrate Raspberry Pi 5 OS from micro SD to NVME m.2 SSD

首先我買了Raspberry Pi CM5後來買了Raspberry Pi CM5 I/O board來當個人電腦使用,系統是安裝在256GB SD卡上運行的很好。用久了在開啟較肥的程式像Web Browser或LiberOffice會有慢半拍的反應,而有了升級NVME m.2 SSD念頭。 因為Raspberry Pi 5支援的最快PCIe gen3 x 4就不去考慮快的Gen4 or Gen5 m.2 SSD。找了ADATA出的 LEGEND 710入門級的產品,會利用HMB(Host Memory Buffer)來加速I/O速度,因為是Raspberry Pi OS kernel會認不得而無法正常使用 事先在SD卡的/boot/firmware/cmdline.txt 加入 kernel command line參數如下,然後重開機m.

By Phillips Hsieh

How to document Home Lab and Network

運維機房和跨域的網路,會遇到各式需求與問題,用對工具才能分析問題,個人覺得最重要的是使用能處理問題的工具。 推薦目前想學和正在使用的平台與軟體,協助將公司/家用機房文件化 佈告欄任務管理 Focalboard 白板可管理任務指派 網路架構文件編寫 netbox 精細管理網路設備與連接線路 IP 資源管理 phpipam 專注網路IP分配 邏輯塊文件編寫 draw.io 視覺化概念圖 機房設備管理 ITDB 管理設備生命週期與使用者

By Phillips Hsieh

如何在Raspberry Pi4上安裝Proxmox for ARM64

第一步 準備好Raspberry Pi 4 / CM4 4GB RAM,這裡要留意CM4如果是買有內建eMMC storage會限制不能使用SD卡開機而限制本地空間容量,如果沒有NAS外接空間或使用USB開機的話,建議買CM4 Lite插上大容量SD卡 第二步 去Armbian官網下載最小化Debian bookworm image https://www.armbian.com/rpi4b/ Armbian 25.2.2 Bookworm Minimal / IOT 然後寫入SD/USB開機碟,寫入方法參考官方文件 https://github.com/raspberrypi/usbboot/blob/master/Readme.md Note: 官方提供的預先設定系統方法,可以在Armbian初次啟動自動化完成系統設定。連結在此 https://docs.armbian.com/User-Guide_Autoconfig/

By Phillips Hsieh