Senin, 16 Juli 2012

No server supplied!

change file php.ini
---------------------
post_max_size = 80M
upload_max_filesize = 80M

Jumat, 15 Juni 2012

install aptana studio 3 ubuntu 12.04

1. download Aptana Studio : Aptana

2. unzip file : $ sudo  unzip Aptana_Studio_3_PHP_Linuz_x86_3.0.0.zip

3.  rename : $ sudo mv nama_direktori_hasil_extract aptana

4. pidah file ke direktori /opt : $ sudo mv aptana /opt/

5. buat shotcut file : $ sudo gedit /usr/share/applications/aptana.desktop

    isi file dengan :
   
    [Desktop Entry]
    Name=Aptana Studio
    Type=Application
    Exec=/opt/aptana/AptanaStudio3
    Terminal=false
    Icon=/opt/aptana/icon.xpm
    Comment=Integrated Development Environment
    NoDisplay=false
    Categories=Development;IDE
    Name[en]=aptana.desktop


6. membuat symlink di direktori /usr/local/bin/ dengan :

    $ sudo cd /usr/local/bin/

    $ sudo ln -s /opt/aptana/AptanaStudio3



Kamis, 03 Mei 2012

install MongoDB ubuntu 12.04

1. install mongodb
     # sudo apt-get install mongodb

2. install pear php
    # sudo apt-get install php-pear

    # pecl install mongo

3. setting php.ini
    # sudo gedit /etc/php5/apache2/php.ini
   
    add :
    extention=mongo.so

4. restart apache
    # sudo /etc/init.d/apache2 restart
   

Selasa, 01 Mei 2012

setting virtual host, ubuntu 12.04

1. buka terminal Ctrl+Alt+T

2. ketikkan : # sudo gedit /etc/apache2/site-available/default [enter]

3. ganti /var/www dengan direktory yang kita inginkan seperti /home/user/www

4. simpan, kemudian reload apache # sudo /etc/init.d/apache2 reload

install LAMP(Linux, Apache, MySQL, PHP) ubuntu 12.04

apt-get install lamp-server^

tanda caping (^) menandakan semua file yang terkait dengan Apache, MySQL, dan PHP akan diinstall secara otomatis.

MEMBUAT FILE KONFIGURASI SENDIRI PADA CODEIGNITER


1. buat file baru didalam folder application -> config. ex : common_config.php

-----------------common_config.php-------------------------------------
$config['project_name']     = 'SCIP System';
$config['project_title']    = 'Supply Chain Integrated Program';
$config['system_version']   = 'v.1';
$config['date_version']     = '15 January 2011';
$config['programmer']       = "Muhamad Yanun As'at";
$config['company']          = 'PT. PERTAMINA (Persero) RU-IV - Cilacap';
------------------------------------------------------------------------

2. buat file baru pada folder application -> helpers. ex : common_helper.php
    kenapa harus dengan _helper, hal itu karena file yang diletakkan didalam folder helpers harus diikuti
    dengan  _helper agar bisa dipanggil oleh sistem.

-----------------------common_helper.php------------------------------------------------------------
/**
 * Project name
 *
 * Returns the "project_name" from your common_config file
 *
 * @access public
 * @return string
 */
if ( ! function_exists('project_name'))
{
function project_name()
{
$CI =& get_instance();
return $CI->config->item('project_name');
}
}


/**
 * Project Title
 *
 * Returns the "project_title" from your common_config file
 *
 * @access public
 * @return string
 */
if ( ! function_exists('project_title'))
{
function project_title()
{
$CI =& get_instance();
return $CI->config->item('project_title');
}
}


/**
 * System Version
 *
 * Returns the "system_version" from your common_config file
 *
 * @access public
 * @return string
 */
if ( ! function_exists('system_version'))
{
function system_version()
{
$CI =& get_instance();
return $CI->config->item('system_version');
}
}


/**
 * Date Version
 *
 * Returns the "date_version" from your common_config file
 *
 * @access public
 * @return string
 */
if ( ! function_exists('date_version'))
{
function date_version()
{
$CI =& get_instance();
return $CI->config->item('date_version');
}
}

/**
 * Programmer
 *
 * Returns the "programmer" from your common_config file
 *
 * @access public
 * @return string
 */
if ( ! function_exists('programmer'))
{
function programmer()
{
$CI =& get_instance();
return $CI->config->item('programmer');
}
}

/**
 * University
 *
 * Returns the "company" from your common_config file
 *
 * @access public
 * @return string
 */
if ( ! function_exists('company'))
{
function company()
{
$CI =& get_instance();
return $CI->config->item('company');
}
}
---------------------------------------------------------------------------------------------------------

3. setelah selesai membuat filenya, selanjutnya tinggal memanggil file-file tersebut. caranya adalah dengan
    mengedit file autoload.php pada folder application -> config

   a. bagian pertama yang perlu diedit adalah :

      $autoload['helper'] = array('common');

      klo dilihat pada nama yang ada didalam kurung array adalah common bukan common_helper. hal ini
      karena untuk _helper akan ditambahkan secara otomatis oleh sistem.


   b. bagian kedua yang perlu untuk diedit adalah :

      $autoload['config'] = array('common_config');

      setelah melakukan edit pada autoload helper,selanjutnya adalah melakukan edit pada autoload config.
       kenapa yang diedti dari tadi adalah file autoload dan bukan file yang lainnya. ini karena kita inginkan  
       agar file-file yang telah dibuat tadi dipanggil secara otomatis oleh sistem. setelah selesai diedit simpan file
       tersebut.

4. selanjutnya akan dicoba untuk memanggil salah satu fungsi yang telah dibuat tadi. caranya adalah dengan
    memanggil nama dari fungsi yang mau dipanggil.

   ex : project_title();

   hasilnya adalah :  Supply Chain Integrated Program











install PostgreSQL ubuntu 12.04

sudo apt-get install postgresql libpq-dev