| ปัญหา และวิธีแก้ไข 1. พบ Warning เกี่ยวกับ Session (คุณ Tanasan Pattanasutticholakul จาก sugarleafdecor.com ถามมา)
Warning: session_start(): open(/tmp\sess_2114bc49c39d64475865d83521844fe9, O_RDWR) failed: ...
Warning: session_start(): Cannot send session cookie - headers already sent by ...
อ่านจาก http://www.oscommerce.com/community/bugs,2950/category,Functions%2B%26%2BClasses
พบวิธีแก้ไข 2 วิธี
1. ยกเลิกการแสดง error ใน php.ini เช่น display_errors = Off
2. แก้ค่า SESSION_WRITE_DIRECTORY ที่เก็บใน MySQL จาก /tmp เป็น tmp
อาจแก้ไขด้วยการเข้าระบบ Admin, Sessions, Session Directory แล้วหาคำว่า /tmp ครับ
 2. แก้ปัญหาสำหรับภาษาไทย (ddfiretech.com)
เพื่อนท่านหนึ่งโทรมาว่า upload script เข้า linux server แล้วใช้ไม่ได้ ขาวไปหมด error message ก็ไม่โผ่
จึงให้ผมเข้าไปเปิด error_log ก็พบว่าภาษาไทยอ้างไปที่ /catalog/includes/languages/Thai และ /catalog/admin/includes/languages/Thai
ผมจึงแก้ชื่อห้อง thai และแฟ้ม thai.php เป็นห้อง Thai และแฟ้ม Thai.php ส่วน admin ก็พบว่าแฟ้ม upload.php มีบรรทัดที่ 31 มีปัญหา
ให้ // หน้าบรรทัดที่ 31 ก็จะเรียบร้อยครับ (thai folder in filezilla)
 3. เข้า catalog/admin เมื่อจาก PHP4 เป็น PHP5
 3.1 พบ application_top.php : warning ในบรรทัดที่ 133
 - Line 132 เดิม $current_page = basename($PHP_SELF);
 - Line 132 ใหม่ $current_page = basename($_SERVER["PHP_SELF"]);
 3.2 พบ classes\upload.php : fatal error ในบรรทัดที่ 31 ?
 - Line 31 เดิม $this = null;
 - Line 31 ใหม่ unset($this);
 3.3 เปิดดูข้อมูล admin/customers.php พบข้อความแทรกใน header
 - แก้โดยเพิ่มบรรทัดด้านล่างนี้เข้าไปใน admin/includes/languages/english.php
 define('TABLE_HEADING_LASTNAME', 'Lastname');
 define('TABLE_HEADING_FIRSTNAME', 'Firstname');
 define('TABLE_HEADING_ACCOUNT_CREATED', 'Account Created');
 define('TABLE_HEADING_ACTION', 'Action');
 define('BOX_CUSTOMERS_APPROVAL', 'Waiting Approval');
 define('HEADING_TITLE_SEARCH', 'Search');
 define('HEADING_TITLE', 'Member approval');
 3.4 catalog/create_account.php  line 232 แก้ปัญหาที่ส่งเมล์ไม่ได้ ?
 if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
$email_text2 = EMAIL_TEXT2;
tep_mail('shop admin', SEND_EXTRA_ORDER_EMAILS_TO, 'A new account has been created!', $email_text2, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);
 }
 3.5 catalog/includes/languages/english/create_account.php
 - แก้โดยเพิ่มบรรทัดด้านล่างนี้เข้าไป
 define('EMAIL_TEXT2', '
 Firstname             :   ' . $firstname . '
 Lastname             :   ' . $lastname . '
 Date of Birth         :   ' . $dob . '
 Address               :   ' . $street_address . '
 Postcode              :   ' . $postcode . '
 City                     :   ' . $city . '
 eMail-Address       :   ' . $email_address . '
 Telefonnumber      :   ' . $telephone . '
 Telefaxnumber      :   ' . $fax . '
 LOGIN                  :   ' . $email_address . '
 PASSWORT           :   ' . $password . '
 ');
 3.6 Warning configure.php permissions ใน PHP5
 - สร้างแฟ้ม blockconfig.php ในห้อง oscommerce แล้วเรียกผ่าน IE
 <?php
 chmod('catalog/includes/configure.php', 0444);
 chmod('catalog/admin/includes/configure.php', 0444);
 header("location: index.html");
 ?>
 - ถ้าผลการทำงานของ blockconfig.php เรียบร้อย ก็ลบแฟ้มนี้ไปได้เลยครับ
?
 | 
| 
การติดตั้ง osCommerce 2.2 Milestone 2 Update 051113 (พฤศจิกายน 2548)
1. Download แล้วส่งห้อง catalog เข้าไปใน Root Directory ของ Server
2. เปิด http://yourdomain/catalog/install/index.php เพื่อติดตั้ง
   3. Click Install, Import Catalog Database, Automatic Configuration, Continue
4. กรอกข้อมูลเกี่ยวกับ Database และไม่เลือก Presistent Connections และเลือก Session Storage=Database    5. ถ้าเชื่อมต่อสำเร็จ ก็ click Continue, Continue, Continue, Continue
6. พบ error จึงต้องไป chmod 777 ให้กับ catalog/includes/configure.php และ catalog/admin/includes/configure.php
7. กดปุ่ม Retry ใหม่
8. ถ้าสำเร็จจะพบ    9. หลังติดตั้งให้ลบห้อง install
10. chmod เป็น 644 ให้กับ catalog/includes/configure.php และ catalog/admin/includes/configure.php การติดตั้ง oscommerce-2.2ms2.zip
1. มีห้อง d:\thaiall.com\oscommerce เตรียมไว้ และเป็น Root Directory ของ http://localhost
2. เครื่องที่ใช้อยู่ต้องเป็น Web Server ที่บริการ php + mysql อาจใช้ apache หรือ iis หรือ omni ก็ได้
3. หลังคลาย .zip จะมีห้อง d:\thaiall.com\oscommerce\oscommerce-2.2ms2
4. อ่านวิธีติดตั้งจาก d:\thaiall.com\oscommerce\oscommerce-2.2ms2\INSTALL
5. copy ห้อง catalog จาก d:\thaiall.com\oscommerce\oscommerce-2.2ms2\catalog เป็น d:\thaiall.com\oscommerce\catalog
6. เปิด http://localhost/catalog/install เพื่อติดตั้ง
 6.1 click install
6.2 สำหรับมือใหม่ click continue ไปเลย
6.3 database=localhost, username=root, password=p, Database name=oscommerce, ไม่เลือก Persistent, Session Storage=Database
6.4 พบว่า username กับ password ของผม ok จากนั้น ก็ click continue อีกครั้ง เพื่อติดตั้งฐานข้อมูลตัวอย่าง (Database Import)
6.5 พบว่าการ import สมบูรณ์ก็ click continue อีกครั้ง เข้าสู่ osCommerce Configuration
6.6 เปลี่ยนคำว่า http://catalog/ เป็น http://localhost/catalog/ ที่เหลือไม่ทำอะไร แล้วก็ continue ต่อไป
6.7 พบ config ของ mysql ที่เคยเห็นมาก่อน ก็ continue ต่อไป
6.8 เลือกเข้า Administration Tool เพราะถ้าเข้า catalog ก็เพียงแต่เข้าไปดูผลงานการติดตั้งเท่านั้น
7. แก้ php.ini จาก register_globals = Off เป็น  register_globals = On
8. เรียบร้อย เปิดดู http://localhost/catalog/ ได้เลย สิ่งที่ต้องทำหลังติดตั้ง
1. สร้างแฟ้ม .htpasswd ด้วย htpasswd -b -d -c .htpasswd uhello psecret แล้วส่งเข้าห้อง c:\thaiabc
2. เพิ่มบรรทัดข้างล่างนี้ในแฟ้ม .htaccess ซึ่งอยู่ในห้อง admin และ install
3. ถ้าจะใช้งานจริงต้องแก้ไข แฟ้มข้างล่างนี้ เพราะห้อง admin สั่ง lock ตามข้อ 1 และ 2 แล้ว
- หาภาพมาแทนห้อง catalog/includes/languages/thai/images/buttons
- catalog/stylesheet.css สำหรับเปลี่ยนรูปแบบ font
- catalog/includes/configure.php สำหรับเปลี่ยน ip ของเว็บ
    เปลี่ยนค่าของ HTTP_SERVER
- catalog/admin/includes/configure.php
    เปลี่ยนค่าของ HTTP_SERVER และ HTTP_CATALOG_SERVER
- catalog/includes/languages/english/index.php
    ตัวแปร TEXT_MAIN เก็บข้อความที่แสดงในหน้าแรกของเว็บไซต์
 catalog/admin/includes/configure.php
 
 
 catalog/includes/configure.php
 
 หน้าเว็บเพจ ของ หน้าบริหารเว็บไซต์ร้านค้า
 
   แนะนำเว็บ (Web Guides)
cmsthailand.com นำเสนอวิธีติดตั้ง
thaimisc.com
octchild.com (osCommerce Plus : download)
thaiecommerce.org
ขาย web template for oscommerce
expired : cmssociety.com 
 เว็บไซต์ของคนไทยที่ใช้บริการ
 + http://www.eleckit.com
 + http://www.oscommercethailand.com
 + http://www.thaidvd4u.com/shop/
 + http://www.somsak2004.net/osc/
 + http://www.netdesignpay.com/oscommerce.asp
 +
 +
 |