Archive for May, 2007

LunarPages中实现gzip压缩输出

Thursday, May 17th, 2007

启用gzip可以将文件压缩到原来的约1/4,也就是速度可以提高到原来的4倍,使用流量将减少到原来的1/4。弄了一个纯文本的html测试,原文件1.6M,竟然压缩掉99%!可见gzip的优势。

这里介绍如何在LunarPages中为网站程序启用gzip压缩,不需要程序的支持,可以为所有的php及html启用gzip压缩。当然,如果你使用的是本身可以启用gzip的程序,例如discuz,wordpress等等,只需要在程序后台启用即可,就不需要这么麻烦了。如果你使用的是像ShopEx这样的没有gzip功能的程序可以使用此方法,可以极大的提高访问速度(ShopEx最大的缺点就是速度慢:)).启用gzip会轻微加重服务器资源消耗,给html启用gzip,则html文件需要经过php引擎编译,会加重服务器负担。

首先给所有的php文件启用gip压缩:

在php.ini中添加下面语句

output_buffering = Off
output_handler =
zlib.output_compression = On

这样就可以给所有php文件进行gzip压缩了。注意的是,这样启用gzip之后需要将程序原来的gzip功能去掉,例如discuz等的gzip不要启用,否则程序会报错。

下面为html页面启用gzip压缩,我们要做的就是让apache将html文件当作php文件处理即可。在.htaccess文件中加入下面的语句即可:

AddHandler x-httpd-php .html .htm

这样就可以为html文件htm文件启用gzip压缩了。

目前只测试了在lunarpages的suPHP中此方法有效,其他主机试过之后再公布。

这个是启用gzip以后的Shopex:http://shopex.lunarpagescn.com

相关连接:

支持国内银行卡付款的美国主机lunarpages

lunarpages优惠券 

LunarPages中文指南

LunarPages 开通信翻译

Thursday, May 10th, 2007

—————————————————————————————-

推荐阅读:

LunarPages购买过程图解 http://www.idcspy.com/bbs/thread-2263-1-1.html

优惠券  percent26 优惠购买总金额的26%   28OFF 优惠28美元

—————————————————————————————-

信件内容很长,只翻译和使用密切相关的部分。

帐户信息部分

Account Information

This gives information on how to access and maintain your account. We highly recommend changing your password periodically to maintain security.
  • Domain: lunarpagescn.com  域名,你购买的时候填写的域名,你的主域名
  • Username: lgnar69                用户名
  • Password: k39q63r10            密码
  • Server: asrist                         服务器名

帐户帮助信息

Account Assistance

Lunarpages has many tools for our customers to assist them with their website. Please see the following:

 

查看网站

View Your Website

Please note that until you upload your information you will see an empty directory.

You should upload all files into the public_html directory of your file manager. Please also see FTP Instructions for more details.

将所有的网站文件上传到public_html 目录,public_html 是网站根目录

If you are purchasing a new domain or changing nameservers on an existing domain, it can take up to 72 hours for the domain to propagate fully. During this time you may not be able to view your site or receive email. For your convenience, we have provided a temporary URL until this is complete (Please note that this URL will not be able to display PHP, ASP, or JSP pages):

http://asrist.lunarservers.com/~lunar54/

在域名没有生效以前可以使用上面的零时地址访问网站

Once propagation is complete you may view your site at the following email links:

生效以后就可以使用下面的地址访问网站

http://lunarpagescn.com

or

http://www.lunarpagescn.com

 

控制面板

Lunarpages Administration Panel

Lunarpages uses CPanel, an easy to use customer account interface.

The administration panel lets you manage your entire website, modify and setup account features and much more.

Instruction Manual: http://www.lunarpages.com/new_manual/index.html

使用说明书 http://www.lunarpages.com/new_manual/index.html

Helpful Tutorials: http://www.lunarpages.com/tutorials/index.htm

帮助指南 http://www.lunarpages.com/tutorials/index.htm

Access Your Control Panel: http://www.lunarpages.com/login.php

登陆控制面板地址:http://www.lunarpages.com/login.php

 

邮件说明

Email Instructions

Your new account offers POP3, IMAP and SMTP access.

POP3 Mail Host: lunarpagescn.com     POP3地址:lunarpagescn.com
SMTP Mail Host: lunarpagescn.com     SMTP地址: lunarpagescn.com 
Webmail Interface: http://lunarpagescn.com/webmail

web邮件地址http://lunarpagescn.com/webmail

Outlook Express E-Mail Setup Help: http://www.lunarpages.com/tutorials/tutorial_files/email_OE.htm

Outlook Express设置帮助:http://www.lunarpages.com/tutorials/tutorial_files/email_OE.htm

Outlook 2002 E-Mail Setup Help: http://www.lunarpages.com/tutorials/tutorial_files/email_outlook2002.htm

Outlook 2002 设置 http://www.lunarpages.com/tutorials/tutorial_files/email_outlook2002.htm

Netscape E-Mail Setup Help: http://www.lunarpages.com/tutorials/tutorial_files/email_netscape.htm

Netscape设置http://www.lunarpages.com/tutorials/tutorial_files/email_netscape.htm

Web Based E-Mail: http://www.lunarpages.com/tutorials/tutorial_files/cpanel_xv2_webmail.htm

网页邮件使用:http://www.lunarpages.com/tutorials/tutorial_files/cpanel_xv2_webmail.htm

How To Create New E-Mail Accounts: http://www.lunarpages.com/tutorials/tutorial_files/cpanel_xv2_POP.htm

如何建立新的邮件帐户:http://www.lunarpages.com/tutorials/tutorial_files/cpanel_xv2_POP.htm

Please note that SMTP authentication must be set.

 

FTP说明

FTP Instructions

You can begin uploading your files immediately.

FTP host address: ftp://asrist.lunarservers.com/ (this can be used until propagation is complete) Or lunarpagescn.com (this can be used once propagation is complete) Critical Note:
In order for your pages to be viewed on the internet, they must be uploaded into the public_html folder. Please also note file names are case sensitive on a Linux server. Your first page on your account should be named “index.html”.

WsFTP Setup Help: http://www.lunarpages.com/tutorials/tutorial_files/ws_ftp_configuresite.htm

CuteFTP Setup Help: http://www.lunarpages.com/tutorials/tutorial_files/cuteftp_configure.htm

SmartFTP Setup Help: http://www.lunarpages.com/tutorials/tutorial_files/smartftp_configuresite.htm

* You understand and agree that shared server space is for business and personal website operations only hosted by Lunarpages and not for unrelated data storage.

FTP地址可以使用域名(要等解析生效以后)或者是IP,主账户的用户名和密码和帐户信息部分部分的帐号和密码一致。所有网站文件应该上传到public_html目录及其子目录下。linux系统区分文件大小写,注意文件的大小写。

 

域名说明

Domain Name Instructions

Critical Note

In order to use your own domain name at Lunarpages you must change the name servers to the following:

ns1.lunarservers.com
ns2.lunarservers.com

解析服务器地址:

ns1.lunarservers.com
ns2.lunarservers.com

If your registrar requires the IP addresses:

ns1.lunarservers.com: 209.200.238.4
ns2.lunarservers.com: 209.200.237.4

Tutorial on How To Change DNS Servers:
http://www.lunarpages.com/tutorials/all_registrars.htm

修改DNS服务器的指导

http://www.lunarpages.com/tutorials/all_registrars.htm

You must visit your registrar (the website where you purchased your domain) to complete this action.

NOTE: You must allow up to 72 hours from the time you change your domain name servers for the domain to work. It takes all registrars this long for your domain changes to reach all the world’s servers.

If you purchased your domain from Lunarpages, it has already been done!

如果你的域名是在lunarpages注册的,那么这一切都是做好的,等域名生效就可以使用了。

Anonymous Domain

After registering a new domain, your personal information is readily available on the Internet via a whois search (whois.com). To ensure your anonymity, Lunarpages has Anonymous Domain Registration available. For more information, please contact sales@lunarpages.com.

 

高级选项

Advanced Options

Lunarpages has the capacity to support several scripting languages including PHP4 and PERL5

Path to Perl 5: /usr/bin/perl     

Perl 5路径:/usr/bin/perl     

 
Path to your HOME directory: /home/USER/public_html/

网站根目录的真实路径:/home/USER/public_html/

Path to your CGI-BIN directory: /home/USER/public_html/cgi-bin

CGI-BIN 目录:/home/USER/public_html/cgi-bin

PHP4 scripts will run from any directory in your site (once DNS propogation is complete, within 72 hours of signup).

All other script documentation, including how to use MySQL, can be found in your Lunarpages Administration Panel.

在Lunarpages安装OSC

Wednesday, May 9th, 2007

使用Fantastico安装,省去了下载上传程序的麻烦,以后升级或者卸载也容易一些。

首先登陆Lunarpages控制面板,进入Fantastico,在左侧显示的程序列表中点击OS Commerce,在右侧显示的信息中点击New Installation开始安装,需要填写信息,如下面说明:

Install on domain  选择安装的域名

Install in directory 选择安装目录(相对于所选择的域名),如果要安装在所选择的域名的根目录留空即可

Administrator-username  管理员用户名

Password 管理员密码

Shop name 店铺名称

Owner’s name  店主名称

Email sender  显示在发给顾客的邮件中的发送者

Your email address 邮件地址,每一个订单都会发给这个邮件一份

Use SSL  是否使用SSL no 否  yes 是

Secure server hostname in case you use SSL 使用SSL的服务器名,只写域名,不要带https://

Show prices incl. tax 是否现实含税价格 No 不显示 Yes 显示

Require client’s birthdate 顾客注册时是否需要填写生日

Require client’s gender  顾客注册时是否需要填写性别

Require company name  顾客注册时是否需要填写公司

Require suburb  顾客注册时是否需要填写郊区

Require State  顾客注册时是否需要填写州

然后点击Install OS Commerce开始安装,确认两次就可以安装成功了。

安装成功访问你的网站,可能会出现如下错误:

Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.

这个是因为全局变量没有开启造成的,在配置文件中开启即可。因为Lunarpages使用的是SuPHP,所以不能在.htaccess文件中设置,需要在php.ini中设置。在public_html中找到php.ini文件将

register_globals = off

改为

register_globals = on

然后在public_html目录下的.htaccess文件中(如果没有就自己建立一个)添加

suPHP_ConfigPath /home/your lunarpages usename/public_html

其中your lunarpages urename换为你的lunarpages 的用户名。

修改完以后重新访问网站应该就可以正常浏览了。现在你就可以开始使用你的网店了。

这是我安装好的osc网站:http://osc.lunarpagescn.com/

推荐文章:lunarpages优惠券  http://www.idcspy.com/bbs/thread-1684-1-1.html

Xoops

Monday, May 7th, 2007

官方地址:http://www.xoops.org

按照国内流行的说法,可以将其归为CMS。但是更确切的说法应该是入口或者是一个平台,本身只有会员管理等基本功能,但是有丰富的模块可以添加,从而实现各种功能。例如常用的有news模块,可以实现文章管理功能,mylinks模块,实现网址列表功能。其他的还有论坛模块,相册模块,下载模块,wiki模块,网店模块等等,基本所有的互联网网站模式都有对应的模块。因此,xoops是一个可订制性强,功能强大的建站平台。

程序是免费开源的,基于PHP+mySQL,网络上有丰富的模块资源以及模板资源可供利用,做英文综合网站的首选。

使用过程中感觉模块的会员权限等设置比较麻烦,不能实现静态化,如果只是想实现文章管理等功能,使用这个程序可能会觉得比较繁琐,不如使用一些专门的CMS程序。

官方网站就是用xoops搭建,大家可以看看是否符合自己的要求。

程序默认的url形式为http://www.xoops.org/modules/mylinks/ ,也就是url中会包含modules,也就是模块的路径,可以通过google搜索modules可以找到很多使用xoops的网站。

[转载]我好累!老板要我推迟答辩!

Thursday, May 3rd, 2007

我出去找工作,在单位试岗1个多月,您非常不高兴我这么多天脱离了您的魔掌,老板

要我推迟答辩,是故意整我!

三年了,跟着您,我没有五一,没有十一,没有暑假,寒假都是腊月28回家,初五

六赶回来,平时都敢跟您请假。您说东我就东,您说西我就西。

外公走的时候,我连最后一眼没来得及看到,只等到下葬时偷偷回家一天。

暑假期间老爸在南京开刀,我也是小心翼翼的跟您请假一天,到了南京也不熟,找

医院都花了半天时间,看我老爸一眼还没等他麻醉清醒过来我就赶回学校了。

第一次出去作课题,我从来没有一个人去一个陌生的地方,就找了一家新开的旅馆

住下,一晚上138¥,我也不清楚是贵了还是贱了,回来您是暴跳如雷啊!第二次出差,

幸好有熟人,借我一个房间,幸好是夏天,虽然没有床,我花了1.5¥买了一份报纸在地

上睡了一夜。

暑假您让我去昆明开会,说没有窝铺了,买了一张硬座,要坐56个小时,我认了。

可是不幸的是中途遇到台风,火车停在荒郊野外23个小时,断水断空调,我实在受不

了,就在下一站下车了。回到合肥就发高烧,医药费花了我400多。您看见我就不满的

说,一点苦都受不了。

9月初,您让我去6中给您女儿交择校费,我从早上8点多排队到中午快1点,热汗浸

透了一身。中午回来您也没有说一句辛苦了的客气话。

您为了拉拢领导,让您的弟子陪领导跳舞唱歌。一个夏天的晚上,都9点多了我也洗

了澡准备上床了,您让我赶到阿里巴巴飙歌城,陪领导唱歌,还要陪领导跳交际舞,我

当时觉得您真的很恶心!

老板当时我以专业第一考进来的时候,您收了你老乡的好处把公费名额给了他,我

当时年少不懂事说了一句话得罪了您,“您不把公费名额给我,我就不想念您的专业

了”,您当时非常气氛,说我居然赶威胁您。接着我找学校调剂,您不放,您说:您的

专业第一如果调剂走了,您脸上不光彩。

三年后的今天,您说我的毕业论文不行,说我三年学习态度不认真,不能毕业。您

说这话也太轻松了吧。父母供我读书那么多年,就等着我早日出来挣钱过好一点的日

子。您考虑过别人的感受么?

您除了好大喜功,除了天天搞您“至高无上”的研究,您想过您还是一个老师。就

算我的论文不合格,您就不能好好的给指导指导么?三年了,我老老实实,您只能说我

能力不行,我的态度哪里就不认真了?

我非科大学生,因为不敢在自己学校的论坛上发帖子,所以在这里借别人的帐号发

泄一下,让大家都看看如今有些导师都是些什么东西!!!

忘了说,每年春节来,我都给您送礼,我的父母也是一般劳动人民,只能给您送几百的

礼了,他们也是为了您不要给我小鞋穿!

WordPress 博客程序

Tuesday, May 1st, 2007

官方地址:http://www.wordpress.org

世界上最流行的blog程序,基于PHP+MySQL构建,免费开源。这套程序简单易用,非常适合新手以及不专于做网站的人使用,或者是站长们搭建快速小巧的发布平台使用。

优点:符合网站开发标准,安装简单,操作简单,有丰富的插件及模板资源可供使用。

在使用时建议开启gzip压缩,URl rewrite等功能。

常用的模板插件非常多,以后陆续在这里补充。

专家:我国网民上网费占收入比是发达国家10倍

Tuesday, May 1st, 2007

据《光明日报》消息,发达国家互联网使用价格不到其收入水平的1%,而我国的比例超过10%,是发达国家的10倍。

我国网民平均每月实际花费的上网费用为83.5元。如果按绝对的货币价格计算,美国人只要以中国人1/12.88的价格就能买回相同的信息量。

世界银行前天发布了《中国的信息革命:推动经济和社会转型》报告。报告指出,尽管中国拥有世界第二大互联网和宽带市场,但目前中国互联网使用价格占收入水平的比重仍然偏高。发达国家互联网使用价格不到其收入水平的1%,而中国的比例超过10%,是发达国家的10倍,也高于东亚及太平洋地区约8%的平均水平。

对此,专家认为,我国的互联网使用资费至少有20%至30%的下降空间,而价格下降的关键是市场的充分竞争。而有关部门普遍的看法是:降低互联网资费,给消费者实实在在的优惠才是真正具有社会责任。今年初,信产部部长王旭东在全国信息产业工作会议上表示,2007年我国电信资费可能实行“不管下限、只管上限”的“上限管理”,一石激起千层浪,降低上网费的呼声再次迭起。

毫无疑问,互联网运营商对此也十分清楚,但由于他们对互联网始终处于垄断地位,因而对降低上网费并不热心。其目的,都是最大限度地保持上网费这一“关税壁垒”,以此继续垄断互联网市场,继续对消费者执行“价格歧视”,千方百计地避免充分而有效的竞争。然而,运营商并没有考虑网民的利益。拿收入水平比较高的北京点击查看北京及更多城市天气预报地区来算,市民的月人均收入只有1000元左右。而普通市民每月却要拿出上百元来上网,这显然加重了他们的生活负担,部分市民因此对互联网敬而远之。

由于互联网资费居高不下,已经在一定程度上成为互联网市场份额继续扩大的绊脚石,对互联网的发展也产生了负面影响。有专家预测,如果上网平均费用降低20%至30%,我国的互联网用户数预计将会以前所未有的速度上升,有可能在现有1.37亿网民基础上,每年增加2000万,到2010年网民将达到2亿。

相关链接

印度将推免费上网

印度政府计划在两年内向所有印度公民提供2Mbps的免费宽带服务,此项目将通过印度国有电信服务提供商BSNL和MTNL实现,届时消费者将获得巨大好处。

各国上网费[按平均每个月每100Kb/s 带宽的费用(单位美元)计算]

土耳其 10.52 墨西哥 6.25

西班牙 4.84 澳大利亚 3.45

加拿大 1.01 中国香港点击查看香港及更多城市天气预报 0.83

英国 0.63 德国 0.52

美国 0.49 法国 0.36

意大利 0.30 中国台湾 0.18

荷兰 0.14 韩国 0.08

日本 0.07 中国 10.8