Jumat, 04 Desember 2009

Install PHP5

  1. Masuk ke direktori php5 port dengan menggunakan perintah:
    cd /usr/ports/lang/php5
  2. masukan perintah sbb:
    make config
    - PENTING : pada tapilan ini pilih Apache ( Build apache module )
    jika tidak biasanya nanti muncul error :
    httpd: Syntax error on line 104 of
    /usr/local/etc/apache22/httpd.conf: Cannot load
    /usr/local/libexec/apache22/libphp5.so into server:
    /usr/local/lib/compat/pkg/libmysqlclient.so.14: version
    libmysqlclient_14 required by /usr/local/libexec/apache22/libphp5.so
    not found


    selanjutnya :
    make install
  3. masuk ke php5-extentions port directory :
    cd /usr/ports/lang/php5-extentions
  4. Instalasi PHP
    make config
    - PENTING :Ojo Lali Pilih juga MYSQL ( MysQl Database Support )

    make install
  5. masuk Ke setting untuk php.ini :
    cp /usr/local/etc/php.ini-dist /usr/local/etc/php.ini
  6. Edit file konfigurasi untuk Apache di (/usr/local/etc/apache22/httpd.conf) and masukkan beberapa baris kode sbb:
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
  7. Kemudian cari kode di bawah ini :
    DirectoryIndex index.html

    ganti dengan kode sbb : >( TAMBAH index.php sebagai default file )

    DirectoryIndex index.php index.html
  8. Start Apache script:
    /usr/local/etc/rc.d/apache22 start

0 komentar:


Blogspot Templates by Isnaini Dot Com. Powered by Blogger and Supported by Lincah.Com - Mazda Cars