Posts Tagged php

  • Netbean : Selected PHPUnit (version ?.?.?)

    Posted in Developer Skills - 19 August 2010 18:24:56
  • If you experience with error message from Netbean “Selected PHPUnit (version ?.?.?) is too old, upgrade it if possible”. you may set your PHP configuration file incorrected.

    Try add Windows Environment variables

    • PHPRC – Specific location of your PHP configuration file.
    • PATH – add Path of your PHP execution file.

    Try command line at your PHP binary directory

    > phpunit

    if your configuration is correct, you should see manual page of phpunit command.

  • PHP 5.2 to PHP 5.3

    Posted in Administrator Skills - 7 June 2010 15:54:43
  • การเปลี่ยน PHP จาก 5.2 ไปยัง 5.3 บน Windows เบื้องต้น ใช้งานไม่ได้ พบปัญหาที่ไฟล์  php5ts.dll แม้ว่าเราจะดาวโหลด PHP VC6 (Thread-safe) Compiled มาก็ตาม เมื่อไล่ดู พบว่า ปัญหาน่าจะมาจากไฟล์ php.ini มีที่รายละเอียดบางอย่างที่เปลี่ยนแปลงไป เลยลองก๊อปไฟล์ php.ini ของตัวใหม่ แทนที่ของตัวเก่าไปเลยก่อน พบว่าสามารถใช้งานได้ทันที ก็เลยต้องตามไปดูว่ามีรายละเอียด Configuration ใดที่เปลี่ยนแปลงไปบ้าง สำหรับการเปลี่ยนจาก PHP 5.2 ไปยัง 5.3

  • WHMCS and Thai language (UTF-8) Patch

    Posted in Administrator Skills - 14 August 2008 10:37:38
  • Build from WHMCS — The Hosting Billing Software does not take full support for other languages except English. You can see that the PDF invoice show incorrect characters. For Thai language who use UTF-8 can use the following patch

    whmcs-utf8-thai-patch.zip

    Tested with following system

    • WHMCS 3.6.2 (Default System Encode: UTF-8)
    • Thai language translation file (UTF-8)
    • UTF-8 Database (Thai language in database cannot reading)
    • TCPDF 4.0.018
    • Tahoma fonts (New Compile)

  • Create Thai PDF file

    Posted in Knowledge - 15 May 2008 20:34:19
  • วิธีสร้าง PDF File ภาษาไทย

    1. http://www.thai-programmer.com/?DPage=25
    2. http://www.ros.co.nz/pdf/
    3. http://www.morelightmorelight.com/projects/walletpdf/
    4. http://www.fpdf.org/ | http://www.fpdf.org/phorum/read.php?f=1&i=5090&t=4996#5090
    5. http://www.setasign.de/products/pdf-php-solutions/fpdi/

    =====================================

    แหล่งข้อมูล: ไม่ทราบแหล่งที่มา (ใครเป็นเจ้าของช่วยบอกด้วยฮะ)

    ให้ดาวน์โหลดตัวที่สร้าง font ก่อน จากที่นี่

    http://www.fpdf.org/fr/dl.php?id=22
    ให้ดาวน์โหลด cp874.map กับ iso-8859-11.map

    หลังจากนั้นจะได้ไฟล์ exe มา 1 ตัว ให้เข้า dos รันมันขึ้นมา โดย
    ใส่ parameter ตามนี้ อย่าไปคลิกที่ตัวมันนะ เพราะต้องใส่ parameter

    ttf2pt1 -b -L cp874.map angsa.ttf angsa

    ตรง angsa.ttf angsa ก็แล้วแต่ font ที่ท่านต้องการจะสร้างว่าต้องการใช้ font อะไรบ้าง

    angsa.ttf เป็น font ใน windows เราอ่ะครับ ไป copy มาก็ได้ จะได้ไม่ต้องใส่ path
    angsa คือชื่อที่เราจะตั้ง

    หลังจากนั้นจะได้ ไฟล์มา 2 ตัว คือ
    angsa.afm กับ angsa.pfb

    หลังจากนั้น copy ทั้งสองตัวไปที่ /font/makefont
    แล้วเขียน ไฟล์ php ตัวนึง ชื่ออะไรก็ได้ เพื่อรัน makefont.php ดังนี้

    MakeFont(‘angsa.pfb’,'angsa.afm’,'cp874′);

    จะได้ file 2ตัวออกมา angsa.php and angsa.z

    copy ไปวางที่ /font
    ใช้คำสั่ง addfont

    $pdf->AddFont(‘angsa’,”,’angsa.php’);