PHP (PHP Hypertext Preprocessor) tidak hanya terbatas untuk membuat output dokumen HTML saja, namun juga bisa digunakan untuk membuat dan memanipulasi file-file gambar dalam variasi format yang berbeda (GIF, PNG, JPEG, WBMP, dan XPM). Dengan kata lain, PHP dapat membuat output stream gambar langsung ke browser.
Untuk dapat mengaktifkan fungsi ini, diperlukan compile "GD Image Support For PHP". Berikut tutorial singkat install 'GD Image Support For PHP' pada cPanel/WHM Server:
» WHM » Software » EasyApache (Apache Update)
[caption id="attachment_1235" align="alignnone" width="150" caption="EasyApache: Image Manipulation"][/caption]
» Klik 'PHP Encryption and Image Manipulation [More Info]'
» Klik tombol 'Build Profile Now'
[caption id="attachment_1237" align="alignnone" width="150" caption="EasyApache: Image Manipulation 2"][/caption]
» Kotak dialog konfirmasi 'Recompile Apache and PHP now?' → klik tombol Yes
[caption id="attachment_1238" align="alignnone" width="150" caption="EasyApache: Image Manipulation 3"][/caption]
» Please acknowledge 'Termination of the build process will result in data loss! The build process is...' → klik tombol I Understand
[caption id="attachment_1239" align="alignnone" width="150" caption="EasyApache: Image Manipulation 4"][/caption]
» Tunggu beberapa menit sampai proses build selesai (lama tidaknya tergantung pada spesifikasi mesin server).
[caption id="attachment_1240" align="alignnone" width="150" caption="EasyApache: Image Manipulation 5"][/caption]
» Configure PHP and SuExec, biarkan default (tidak usah diedit / optional). Klik tombol Close
[caption id="attachment_1241" align="alignnone" width="150" caption="EasyApache: Image Manipulation 6"][/caption]
Untuk cek apakah GD Image Support For PHP sudah terinstall (gd baris ke-13), cek via putty dan jalankan command berikut.
php -m
[bash highlight="13"]
root@server5 [~]# php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
ereg
filter
ftp
gd
hash
iconv
imap
json
libxml
mcrypt
mysql
openssl
pcre
Phar
posix
Reflection
session
SimpleXML
sockets
SPL
SQLite
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib
[Zend Modules]
root@server5 [~]#
[/bash]
Selesai
Referensi manual Image Processing and GD:
http://php.net/manual/en/book.image.php
Link 2 My Blog
If you find this blog useful or feel it would be useful to link from your blog or website, I would be extremely appreciative if you place this hyperlink code below to your site.
<a href="http://linggihnote.blogspot.com/" target="_blank"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx3jAGDB9ZDuc1ODWdIK3SPJBeIZF71xHZRwJSucIeJoSXiC3L7UmGUVaWIcT8O_e-5ulL1UykmZF8lH6H-k49Nc0-zNFVHE7T75Aj1vrqutqV8PwjjL1TvFsCAoiCjaoPIBv7IyreXpKR/s1600/Logo_Icon.png" /></a> |
Recent Posts |
Tidak ada komentar:
Posting Komentar