April 08, 2007

PHP5 & osCommerce

If you install osCommerce in PHP5 environment, must fix this below file code.
In admin\includes\classes\upload.php file, find out line 31.
// self destruct
// $this = null;
unset($this);
Other issue:
http://www.magic-seo-url.com/oscommerce/tips/running-oscommerce-with-register-globals-off.html

Posted by philipz at 02:57 AM | Comments (0)

April 05, 2007

How to Upgrade osCommerce form ms1(latin1) to ms2(utf8)

Pre-Installation Procedure:
1. Download the osc22ms2_utf8.zip file from http://www.kmd.com.tw/
2. Unzip this file to new folder of Web Server.

Upgrade Procedure:
1. Type the URI of new folder in Web Server. Ex: http://www.xxx.com/install/index.php
2. Click the Install Button.
3. Select the Upgrade option.
4. Type Mysql db information.
5. Select the "Continue" Button, then you will see those tables of db have been modified successfully.
6. Type the URI of step1 again, and click the Install Button, too.
7. Select the Install option.
8. Don't select the import any db data option, select save the configuration.
9. Type Web Server information.
10. type Mysql db information.
11. Finish, check your new osCommerce website.

Change MySQL data in latin1 to utf8:
This step, you can refer Turning MySQL data in latin1 to utf8 utf-8, or WP.ORG.CN
But, just use "mysqldump -uUSERNAME -pPASSWORD --database DBNAME --default-character-set=latin1 > /home/SAVEFILE", then open SAVEFILE by Notespad, import the SAVEFILE through phpmyadmin.

Modify osCommerce Database.php code:
1. Find out "mysql_query" string in Three file, includes\functions\database.php, admin\includes\functions\database.php, install\includes\functions\database.php.
2. Insert below words before "mysql_query" string.
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER_SET_CLIENT=utf8");
mysql_query("SET CHARACTER_SET_RESULTS=utf8");

Posted by philipz at 03:12 AM | Comments (0)