ionCube Loader 는 ionCube Encoder 로 변환한 코드를 부를 수 있게 해 주는 php 확장팩이다. 아래는 ionCube에 대한 소개다.
About ionCube ionCube was created particularly to meet the clear need for a quality, reliable, and affordable solution for the protection of PHP based intellectual property. Launching a unique online encoding service, and soon after its Standalone PHP Encoder software, ionCube was quickly established and recognised as a leading provider of encoding solutions for PHP. ionCube incorporates over 23 years experience in software development. This includes bespoke operating systems, languages and compilers, database engine technology, and PhD research into innovative microprocessor design and system architecture for high performance object-oriented parallel-processing hardware. Immediately before establishing ionCube, Managing Director Nick Lindridge designed and developed ultra high performance order routing and exchange connectivity technology for one of the UK's leading market making firms that were acquired by one of the major US financial institutions as a result. Where industry experience, technical understanding and expertise in exploiting a technology to the full are paramount, ionCube represents the all round best investment for PHP encoding technology. |
장점은 암호화뿐만 아니라 속도 개선도 있다. 그리고 최근 php 를 이용하는 오픈소스 솔루션들이 ionCube 를 요구하고 있다. 이에 ionCube 설치법을 아래와 같이 보여 주고자 한다.
1. 다운로드하기
친절하게도 무려 OS를 4개나 지원한다. Linux, FreeBSD, Windows, MacOS.
자기 운영체제에 맞는 gz나 zip을 다운 받으면 된다. (이게 귀찮으면 wget 으로 받아도 된다. 그건 링크의 블로그를 참조.)
2. 파일 업로드
서버에 업로드를 한다. 이때 MacOS나 Windows는 잘 설정할 수 있는데 Linux 나 FreeBSD의 경우 아래 폴더에 넣으면 좋다.
Linux
/usr/lib64/ioncube |
FreeBSD
/usr/local/lib/php/ioncube |
3. php.ini 수정하기
linux 는 /etc 아래에 php.ini 가 있어서 아래 줄을 하나 추가하면 된다.(아래는 php 7.4 버전이다.)
zend_extension = /usr/lib64/ioncube/ioncube_loader_lin_7.4.so |
FreeBSD는 는 php.ini 파일이 없다. 대신에 /usr/local/etc/php 폴더에 php.ini 를 생성하거나 아니면 거기에 있는 파일에 아래 항목을 추가한다. (php 8.3 버전일 경우다.)
zend_extension = /usr/local/lib/php/ioncube/ioncube_loader_fre_8.3.so |
4. apache/httpd 재시작
apachectl restart 혹은 systemctl restart httpd.service
이때 오류가 발생하면 그 오류의 원인을 찾아서 해결을 한다.
5. 동작 확인
웹 상에서 phpinfo를 실행시키거나 프롬프트에서 php -v 를 실행한다.
가. 웹 상에서 phpinfo 실행 시 (빨간 네모 상자 안.)
나. php -v 로 확인 (빨간 네모 상자 안)
Linux 버전과 FreeBSD 버전을 첨부. 물론 encoding을 하지 않으면 굳이 설치할 필요는 없다.