1 / 3
Caption Text
2 / 3
Caption Two
3 / 3
Caption Three margin testing

Friday, October 16, 2009

Zen Cart and shared hosting

Zen Cart and shared hosting

So, how many users will your site handle without having the web hosting provider suspending your hosting account and sending you a nasty email? Frankly, I'm not sure. But a client of mine got her account suspended when her online advertisement (Facebook CPC ad) brought about 90 users to her site at about the same time. Normally, her site will have about 20 users online most of the time.

Okay, what about choosing a web hosting provider? Well, just choose from the more reputable hosting providers. Zen Cart server requirements are similar to most other programs and hosting companies should have no problem with that.

Having said that, I did still face some issues with a couple of hosting companies:

1. Hosting company A - PHP runs with Safe Mode turned ON
Zen Cart seems to run okay but Image Handler 2 just won't run properly. See this forum post for more info about servers with PHP Safe Mode turned ON.

2. Hosting company B - No cURL support
Zen Cart will run without cURL but some shipping and payment modules require cURL

So, if you're not sure, ask the hosting provider first!

Change Character Set to UTF-8 in Zen Cart

English IS0-8859-1 files to UTF-8 | SRW2D

First of all, the Zen-Cart encoding is IS0-8859-1 by default. IS0-8859-1 can be changed to UTF-8 with not much effort!

The first change needed is to english.php:

The path to this file is: includes/languages/english.php

Open it in your text editor and then follow these instructions:

1->Line 22 or near there if the file has been edited, you will find this:
@setlocale(LC_TIME, 'en_US.ISO_8859-1');

2->Change this line to this:
@setlocale(LC_TIME, 'en_US.utf8');

3->Line 49 or so again. Find this:
define('CHARSET', 'iso-8859-1');

4->Change it to this:
define('CHARSET', 'utf-8');

The next file to change has the same name but is in a different directory:

Find it in: admin/includes/languages/english.php

1->On line 20 find:
setlocale(LC_TIME, 'en_US.ISO_8859-1');

2->
Change to this:
setlocale(LC_TIME, 'en_US.utf8');

3->On line 63 find:
define('CHARSET', 'iso-8859-1');

4->Change this to:
define('CHARSET', 'utf-8');

The next change is to query_factory.php.

Find it in: includes/classes/db/mysql/query_factory.php

1-> Find this (line 33):

// pconnect disabled ... leaving it as "connect" here instead of "pconnect"
$this->link = @mysql_connect($zf_host, $zf_user, $zf_password, true);
}
if ($this->link) {
if (@mysql_select_db($zf_database, $this->link)) {
$this->db_connected = true;
return true;
} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
}

2-> Change to this (this will not work as an override):

// pconnect disabled ... leaving it as "connect" here instead of "pconnect"
$this->link = @mysql_connect($zf_host, $zf_user, $zf_password, true);
}
if ($this->link) {
if (@mysql_select_db($zf_database, $this->link)) {

//BOF changed for utf-8
mysql_query('SET NAMES "utf8"', $this->link);
//EOF changed for utf-8

$this->db_connected = true;
return true;
} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
}


Note the key change is :
//BOF changed for utf-8
mysql_query('SET NAMES "utf8"', $this->link);
//EOF changed for utf-8


Also, here is an important tip. At this point you should change your admin folder name now for security issues. For more information on this go
[here]

WordPress 主题发布: Blocks

主题发布: Blocks

Jul 13th, 2008
Blocks Preview

主题简介:
Blocks 是从我的 Opera Blog 里移植过来的, 简单清爽, 零图片. 该主题布局灵活, 可以在后台切换成两栏模式或者三栏模式, 也可以将侧边栏切换为居左或居右, 支持 Widgets, 兼容WordPress 2.7 嵌套回复, 评论翻页等新特性.
已发布 YO2 的专用版本: Blocks for YO2

相关标签:
双栏式, 三栏式, 固定宽度, 支持 Widget, 左侧边栏, 右侧边栏, 白色, 简洁, 淡雅, 通过 XHTML, 通过 CSS, 后台管理

适用版本:
WordPress 2.5 或以上版本

主题演示:
点击这里进入演示页面

主题下载: Download

测试验证:
测试用 WordPress: 2.5.1, 2.6.1, 2.7.1, 2.8.3
测试用浏览器: IE 6/7/8, Firefox 2/3/3.5, Opera 9.6, Safari 4 和 Chrome 2.0
通过 XHTML 1.1 和 CSS 3 验证

推荐插件:
Subscribe to Comments
WP23 Related Posts
WP-PageNavi
WP-RecentComments
WP-Syntax
Mail To Commenter (@+user+blank)
Quick Comments

主题本地化:
此版本支持英文和简体中文, 其中英文是默认设置. 若要使用简体中文, 请执行以下步骤:
1. 打开 WordPress 根目录的文件 wp-config.php.
2. 查找 define ('WPLANG', ''); 并修改为 define ('WPLANG', 'zh_CN');

声明: 本站遵循 署名-非商业性使用-相同方式共享 3.0 共享协议. 转载请注明转自 NeoEase

Featured Post

Windows和Ubuntu双系统完全独立的安装方法

http://www.ubuntuhome.com/windows-and-ubuntu-install.html  | Ubuntu Home Posted by Snow on 2012/06/25 安装Windows和Ubuntu双系统时,很多人喜欢先安装windows,然...