Instalasi dan Konfigurasi PHP di IIS

By | 26/08/2011

Warning: curl_init() has been disabled for security reasons in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 95

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 97

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 98

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 100

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 103

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 106

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 333

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 334

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 363

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 370

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 375

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 376

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 377

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 379

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 382

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 389

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 390

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 391

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 154

Warning: curl_exec() has been disabled for security reasons in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 162

Warning: curl_errno() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 167

Warning: curl_errno() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 416

Warning: curl_getinfo() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 424

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 181

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 182

Warning: curl_init() has been disabled for security reasons in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 95

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 97

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 98

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 100

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 103

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 106

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 333

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 334

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 363

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 370

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 375

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 376

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 377

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 379

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 382

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 389

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 390

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 391

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 154

Warning: curl_exec() has been disabled for security reasons in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 162

Warning: curl_errno() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 167

Warning: curl_errno() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 416

Warning: curl_getinfo() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 424

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 181

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 182

Warning: curl_init() has been disabled for security reasons in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 95

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 97

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 98

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 100

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 103

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 106

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 333

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 334

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 363

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 370

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 375

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 376

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 377

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 379

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 382

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 389

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 390

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 391

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 154

Warning: curl_exec() has been disabled for security reasons in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 162

Warning: curl_errno() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 167

Warning: curl_errno() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 416

Warning: curl_getinfo() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 424

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 181

Warning: curl_setopt() expects parameter 1 to be resource, null given in /home/berukcom/public_html/wp-includes/Requests/Transport/cURL.php on line 182

Apache, bukan satu-satunya server dimana PHP bisa hidup. PHP memang multi platform. Anda bisa menggunakannya dengan hampir (kalau gak salah) semua web server di dunia. Baik yang anda ketahui maupun tidak.

Meskipun demikian, PHP akan menunjukkan keperkasaannya jika disandingkan dengan Apache. Dan apache bekerja paling sempurna pada lingkungan Unix (Linux, misalnya).
Tutorialini untuk anda yang masih belum bermigrasi atau iseng.

IIS yang saya gunakan adalah default dari CD instalasi Windows XP, versi 5. Saya menginstallnya melalu Programs >> Control Panel >> Add/Remove Programs. Klik tab Add/Remove Windows Components.

Centang IIS (Internet Information Services), klik next-nextfinish 🙂

Menginstall MySQL

Menginstall MySQL di windows relatif mudah. Anda tinggal mendownload installernya dari situs mysql dan menjalankannya.
Ikuti saja langkah-langkahnya. Yah, tinggal klik next – next – next tahu-tahu finish 🙂

Menginstall PHP 5

Menginstall PHP bersama IIS sama saja susahnya dengan menginstall PHP bersama Apache. Di IIS anda “tertolong” karena bisa melakukan klak-klik melalu IIS Control Panel.

Pertama, sebaiknya anda mendownload source code php dulu. Pastikan anda memilih “For Windows!”.
Ekstrak ke c:php
Sehingga struktur direktorinya seperti ini:
c:php, c:phpext (ini yang penting anda ketahui)

Langkah selanjutnya adalah mengkonfigurasi PHP agar bekerja di IIS.
Langkah-langkah ini valid untuk IIS versi 4 ke-atas. IIS yang saya dapatkan adalah versi 5.

1. Modifikasi file php.ini
Masuk ke folder c:php. Rename file php.ini-recommended menjadi php.ini.
Buka dengan editor teks (notepad). Cari baris dan set nilainya sbb:
doc_root = c:inetpubwwwroot
extension_dir = c:phpext
browsecap = c:windowssystem32inetsrvbrowscap.ini

2. Menambahkan folder instalasi php dalam path windows
Menambahkan folder instalasi ke path windows akan membuat anda gampang melakukan upgrade php, daripada mengkopi file-file dan meletakkannya di folder systems windows.
Langkahnya adalah. Klik kanan My Computer > Properties > Advanced > Environment variables

Pada bagian system variables di sub bagian PATH. Klik edit. Tambahkan “;c:php” tanpa tanda kutip.

3. Konfigurasi IIS Untuk PHP
Aktifkan IIS Control Panel melalui menu Programs > Administrative Tools > Internet Information Services.
Jika anda tidak melihat menu Administrative Tools, klik kanan pada Start Menu anda, klik Properties. Klik bagian customize, pindah ke tab Advanced, Scroll dibagian Start menu items, pilih Display on … di bagian System Administration Tools.

Navigasikan mouse anda ke bagian webserver, di sidebar kiri. Klik nama komputer anda, klik websites, dan klik kanan pada Default Web Sites. Pilih properties.

Pada jendela konfigurasi yang terbuka. Klik tab ISAPI Filters.
Klik Add untuk menambahkan filter baru. Tulis php sebagai nama filter, c:phpphp5isapi.dll sebagai executable-nya. Atau klik browse, jika anda menginstall ditempat lain.

Pada tab home directory, pada bagian execution permissions, pastikan anda memilih scripts only. klik di bagian configuration untuk menambahkan php.

Pada bagian mapping, klik Add. Ketik c:phpphp5isapi.dll atau file php5isapi.dll.
Pada bagian ekstension, ketik .php
Pastikan anda mencentang pilihan script engine.

Berpindah ke bagian Documents, tambahkan index.php di bagian document header.

Sekarang, restart webserver anda (stop dan start lagi), dengan mengklik tombol stop dan play (yap, ikonnya seperti pada ikon player).

Checking

Buat file test.php dan simpan di folder c:inetpubwwwroot menggunakan notepad. Tambahkan baris berikut:

<?php phpinfo() ?>

Simpan dan akses menggunakan web browser anda di alamat http://localhost/wp/test.php.

Jika yang keluar adalah halaman informasi instalasi php, berarti anda sudah sukses melakukan instalasi.

TroubleShooting

Asumsi saya, jika anda mengikuti instalasi sesuai tutorial ini, anda pasti sukses 100%. Jika ada masalah, coba sekali lagi. Kalau anda bingung, silahkan diketik di komentar saja. Terangkan juga detil error yang terjadi.

Yang jelas, saya menemukan masalah yang cukup membingungkan dan sampaisekarang belum solved. Konfigurasi php,php.ini tidak mau diupdate/load.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.