1. PHP 5 Enterprise Edition

    1/12/2006
    By eko, category: PHP

    Introduction

    Without dispute, “enterprise” is a much-disputed term in the software
    market. Many companies label their software as an enterprise application
    due to marketing reasons in the hope to grab a piece of the cake. PHP
    companies are not free from entering the “enterprise barkers”,
    especially now that PHP 5 is out[1] – mostly because it offers
    better objectoriented and XML programming features compared to PHP4. But
    does that qualify to meet the demands of the enterprise market? The past
    years have seen a convergence in the enterprise application sector,
    favouring a component-based and multi-tier application architecture.
    Hence, the question is also whether such architecture can be built for
    mission-critical projects with available PHP software. The evolution of
    enterprise software development has mainly been driven by the Java 2
    Enterprise Edition (J2EE)[2]. Today, J2EE could be named the de facto
    industry standard for the development of distributed multi-tier
    architecture applications. It is backed up by industry leaders like Sun,
    Oracle, BEA, and IBM. This article will compare PHP’s software stack
    with what’s available in (and for) J2EE, to overcome the typical
    Java versus PHP discussions that usually focus on language features, but
    do not take into account the overall picture. Basically, this article
    assembles a PHP5EnterpriseEdition(PHP5EE). read more »

  2. Menampilkan Encoding Database di PostgreSQL

    Tadi sempat bingung mencari “padanan” perintah “\l” (menampilkan daftar database) di console PostgreSQL dengan perintah SELECT asli nya. tanya ke beberapa temen lom dapet-dapet. Setelah liat sana-sini akhirnya dapet juga “padanan” nya.

    berikut ilustrasinya:



    reports# \l
    List of databases
    Name | Owner | Encoding
    ----------------+----------+----------
    gdb | globe | UTF8
    milis | postgres | UTF8
    milis2 | milis | UTF8
    postgres | postgres | UTF8
    reports | postgres | UTF8
    template0 | postgres | UTF8
    template1 | postgres | UTF8
    (7 rows)
    reports#

    kemudian padanan dengan perintah “SELECT”:


    reports# select d.datname as "Name", u.usename as "Owner", pg_encoding_to_char(encoding) as "Encoding" from pg_database d, pg_user u where d.datdba=u.usesysid order by d.datname;
    Name | Owner | Encoding
    ----------------+----------+----------
    gdb | globe | UTF8
    milis | postgres | UTF8
    milis2 | milis | UTF8
    postgres | postgres | UTF8
    reports | postgres | UTF8
    template0 | postgres | UTF8
    template1 | postgres | UTF8
    (7 rows)
    reports#

    Jadi ingin mencari SELECT-SELECT yang lain neh, kan masih banyak tuh. ada \dS, \dt, \dn dan konco-konco nya :D , yang jelas di postingan mendatang pasti akan aku sertakan.

    Semoga bermanfaat.

  3. SETTING LANGUAGE C di POSTGRES

    Pernah anda mengalami error ketika melakukan perintah GRANT .. LANGUAGE C … di PostgreSQL ? kemungkinan pasti ada, saya pernah mengalami hal ini beberapa hari yang lalu. Awalnya membuat database yang hak aksesnya untuk user tertentu, dimana user tersebut harus bisa membuat fungsi yang LANGUAGE nya adalah C.

    Saya ilustrasikan seperti ini.

    Login sebagi superuser postgres ( = postgres )untuk membuat user baru:

    >psql -Upostgres template1
    template1=# create user milis with createdb nocreateuser encrypted password ‘milispwd’;
    CREATE ROLE
    template1=#

    Buat database baru( yang membuat adalah user yang baru ditambahkan = milis):

    >createdb –encoding=UTF8 -Umilis -W milis2

    Sebagai superuser berikan perintah grant agar user milis memiliki akses ke LANGUAGE C:

    template1=# grant all privileges on language c to milis with grant option;

    jika anda beruntung maka tidka akan muncul pesan error apapun, tapi jika menjumpai error seperti ini

    ERROR: language “c” is not trusted
    HINT: Only superusers may use untrusted languages.

    maka anda harus mengatur tabel pg_language,

    template1=# update pg_language set lanpltrusted=true where lanname=’c';

    kemudian berikan perintah GRANT seperti diatas

    template1=# grant all privileges on language c to milis with grant option;

    Sekarang user “milis” siap untuk membuat FUNCTION dengan LANGUAGE C.

    Login sebagai user “milis” ke database “milis2″ yang sudah dibuat diatas,kemudian coba buat FUNCTION dengan LANGUAGE C.

    >psql -Umilis milis2
    milis2=> create function my_func_encrypt (bytea, bytea, text) returns bytea as
    milis2-> ‘$libdir/pgcrypto’, ‘pg_encrypt’
    milis2-> language ‘c’;
    CREATE FUNCTION
    milis2=> select my_func_encrypt(‘rahasia’, ‘hashRahasia’, ‘bf’);
    my_func_encrypt
    —————————-
    \031\267\301\242\254\307-+
    (1 row)

    milis2=>


    Semoga bermanfaat.

  4. kurs sederhana menggunakan PHP

    19/08/2006
    By eko, category: PHP

    Sudah tentu semua pernah melihat situs yang menampilkan kurs mata uang. Sedikit trik kita bisa mengambil kurs mata uang secara realtime menggunakan PHP. Code ini sebenarnya banyak di internet, karena ini memang saya ambil dari sana, hanya saja sudah lupa dimana dulunya :D .
    Dengan berpedoman pada contek, modif dan kembangkan sendiri jadilah seperti yang dibawah ini: read more »

  5. php_yaz.dll

    12/08/2006
    By eko, category: PHP

    ternyata…
    PHP sudah mendukung penggunaan standard MARC record internasional ya… baru tau daku :D , modul nya bernama yaz (php_yaz.dll di windows ato yaz.so di Linux). cuman sepertinya konfigurasi pada PHP 4 dan PHP 5 ada perbedaan. di PHP 5 belom pernah berhasil dan selalu muncul pesan error di Log Apache seperti berikut:

    PHP Warning:  PHP Startup: Unable to load dynamic library ‘C:/php5/ext\\php_yaz.dll’ – The specified procedure could not be found.\r\n in Unknown on line 0
    [Sat Aug 12 08:19:03 2006] [notice] Apache/2.0.54 (Win32) PHP/5.1.4 configured — resuming normal operations
    [Sat Aug 12 08:19:03 2006] [notice] Server built: Apr 16 2005 14:25:31
    [Sat Aug 12 08:19:03 2006] [notice] Parent: Created child process 2120
    PHP Warning:  PHP Startup: Unable to load dynamic library ‘C:/php5/ext\\php_yaz.dll’ – The specified procedure could not be found.\r\n in Unknown on line 0
    [Sat Aug 12 08:19:03 2006] [notice] Child 2120: Child process is running
    [Sat Aug 12 08:19:03 2006] [notice] Child 2120: Acquired the start mutex.
    [Sat Aug 12 08:19:03 2006] [notice] Child 2120: Starting 250 worker threads.

    So… belom ngerti cara install modul YAZ di PHP 5.1.4 :D

    Tapi untuk PHP 4 (terutama PHP-4.4.2) adalah sebagai berikut.
    Konfigurasi YAZ di PHP-4.4.2 (windows)
    1. load module yaz di php.ini
        extension=php_yaz.dll
    2. copy file yaz.dll (berada pada direktori c:\php4) ke direktori C:\windows\system32
    3. pastikan file php_yaz.dll telah ada pada direktori c:\php4\extensions
    4. restart apache

    Paket program yang saya pake Apache 2.0.55, PHP-4.4.2 semuanya for windows.

Recent Post

Recent Comment

Archive