始终无法开启wordpress for sae的Gzip

查了很多多的资料,尝试很多的方法,但最终都失败。
无论是SAE的AppConfig选择页面压缩,还是在index.php中添加代码,还是使用插件,都没有成功。
最接近成功的是添加
if(ereg(‘gzip’,$_SERVER[‘HTTP_ACCEPT_ENCODING’])){
if(substr($_SERVER[‘REQUEST_URI’],0,10)!=’/blog/wp-content/uploads/’)
ob_start(‘ob_gzhandler’);
可以成功压缩,但打开网页出现错误提示:SAE_Deprecated: Function ereg() is deprecated in index.php on line 15
好像是因PHP函数ereg()有问题,我简单把它换成preg_match(),也是可以压缩但显示错误提示。

我心中很是奇怪,明明按着别人说的方法,同样是wordpress for sae,人家可以,我为何就不可以。
—————-
Gzip测试地址
http://tool.chinaz.com/Gzips

在index.php中加入ob_start(‘ob_gzhandler’);
没有压缩

在index.php中加入ob_start(‘ob_gzhandler’);
是否压缩 是
压缩类型 gzip
原始文件大小 105 字节
压缩后文件大小 117 字节
压缩率(估计值) -11.43%
有压缩,还是负的,而且显示出错
SAE_Parse_error: syntax error, unexpected ‘/’ in index.php on line 17

if(ereg(‘gzip’,$_SERVER[‘HTTP_ACCEPT_ENCODING’])){
if(substr($_SERVER[‘REQUEST_URI’],0,10)!=’/blog/wp-content/uploads/’)
ob_start(‘ob_gzhandler’);
}
加入后可以压缩,但显示出错。
网址 snowson.sinaapp.com 检测结果如下:
是否压缩 是
压缩类型 gzip
原始文件大小 47427 字节
压缩后文件大小 17305 字节
压缩率(估计值) 63.51%
SAE_Deprecated: Function ereg() is deprecated in index.php on line 15
以上报错是因为PHP版本是5.3,5.3的版本废弃了‍ereg() 、‍ereg_replace() ,所以会出现这个问题,DEDE的程序都是用的这个如果用5.3版本的php就会出现这个,具体解决办法:http://hi.baidu.com/ooleo/blog/item/70fc5b820d6d5081f703a60e.html

if(ereg(’gzip’,$_SERVER[‘HTTP_ACCEPT_ENCODING’])){ //判断浏览器是否支持Gizp
if(substr($_SERVER[‘REQUEST_URI’],0,10)!=’/wp-content/uploads/’) //排除不需要Gzip压缩的目录
ob_start(’ob_gzhandler’); //打开Gzip压缩
}

if(substr($_SERVER[‘REQUEST_URI’],0,10)!=’/wp-content/uploads/’)
ob_start(’ob_gzhandler’);
SAE_Warning: Division by zero in index.php on line 15

PHP Version 5.3.8
System SAE LINUX ENVIRONMENT
_SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate,sdch

preg_match()

使用插件GZippy,不能启用Gzip,亦无报错。

if(strpos($_SERVER[‘HTTP_ACCEPT_ENCODING’], ‘gzip’) !== FALSE)  ob_start(‘ob_gzhandler’);
不能启用Gzip,亦无报错

WordPress Gzip Compression

SAE_Warning: ob_start() [ref.outcontrol]: output handler ‘ob_gzhandler’ cannot be used twice in wp-content/themes/elegant-box/header.php on line 1

SAE_Parse_error: syntax error, unexpected ‘/’ in index.php on line 17
SAE_Parse_error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in index.php on line 17

SAE官网链接图标
Powered by Sina App Engine

时间:2012-05-22 下午11:07:00 
标签: SAE, wordpress

2014-01-11 21:01:58 Migrated From Blogger

WordPress for SAE/wp4sae社交评论插件选择多说Social Medias Connect友言|WordPress for SAE错误信息汇总

WordPress 3.2.1 for SAE中自带着qiqiboy的Social Medias Connect(社交媒体连接)。用了一段时间,发现总是出错。
在添加评论时SAE_Warning: preg_replace_callback
文章中有图片发布时SAE_Warning: file_get_contents

本来想查查出错原因,后来发现很多人都在说多说插件不错,前些天正好也有看到,而“科学松鼠会正在使用多说”,这也让人觉得它还是比较靠谱的。
于是索性尝试用多说0.7.1,感觉效果不错,反应很快,初步使用未见出错。

qiqiboy’s Social Medias Connect所以出错,可能是因为SAE移植版的WP,官方WP应该没有这些问题。但毕竟它只是个人制作维持,而多说则是团队动作。
另外好像友言用的人也很多。
———————–
WordPress 3.2.1 for SAE错误汇总

http://snowson.sinaapp.com/?p=322&oauth_token=““&oauth_verifier=242172
您的主机配置不正确,请检查您主机的php.ini中的session.save_path设置,或者将session.use_trans_sid一项设置为session.use_trans_sid=1。

添加评论2012-5-22 7:51:04http://1.snowson.sinaapp.com/wp-comments-post.php
SAE_Warning: preg_replace_callback() [function.preg-replace-callback]: Empty regular expression in wp-content/plugins/social-medias-connect/sinaweibo/smcOAuth.php on line 338
SAE_Warning: Cannot modify header information – headers already sent by (output started at /data1/www/htdocs/848/snowson/1/wp-content/plugins/social-medias-connect/sinaweibo/smcOAuth.php:338) in wp-content/plugins/social-medias-connect/function.php on line 894
SAE_Warning: Cannot modify header information – headers already sent by (output started at /data1/www/htdocs/848/snowson/1/wp-content/plugins/social-medias-connect/sinaweibo/smcOAuth.php:338) in wp-includes/pluggable.php on line 934

点击发布按钮后提示:2012-05-19
SAE_Warning: file_get_contents(http://ww3.sinaimg.cn/bmiddle/44cb9f39jw1dt3ymrtnr7j.jpg) [function.file-get-contents]: failed to open stream: HTTP request failed! in wp-content/plugins/social-medias-connect/OAuth.php on line 800
SAE_Warning: Cannot modify header information – headers already sent by (output started at /data1/www/htdocs/848/snowson/1/wp-content/plugins/social-medias-connect/OAuth.php:800) in wp-includes/pluggable.php on line 934

SAE_Warning: Cannot modify header information – headers already sent by (output started at /data1/www/htdocs/848/snowson/1/wp-config.php:1) in wp-includes/pluggable.php on line 934
原因:
编辑wordpress的PHP文件后,保存时使它添加了一个Unicode签名(BOM),而wordpress使用的PHP文件不支持BOM。
http://55380855.blogspot.com/2012/05/wordpressphpbomsaewarning-cannot-modify.html

SAE_Fatal_error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 523800 bytes) in wp-content/plugins/social-medias-connect/function.php on line 1263
SAE_Fatal_error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 523800 bytes) in document/DoYouHaoBaby/LibPHP/App/Lib/Config/ConfigKey.class.php on line 35
内存不足溢出解决方法 2012年5月2日
http://1.snowson.sinaapp.com/?p=155

百度地图Baidu Sitemap Generator
SAE_Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/data1/www/htdocs/848/snowson) is not within the allowed path(s): (/usr/local/sae/php/lib/php/sae_std_lib/:/usr/local/sae/php/lib/php/apibus_lib/:./:/usr/share/fonts/chinese/TrueType:/data1/www/htdocs/848/snowson/1/:/saetmp/848/snowson/1337653628_665697665/:) in wp-content/plugins/baidu-sitemap-generator/sitemap-function.php on line 198

google-analytics
SAE_Fatal_error: Call to undefined method WP_Error::get_items() in wp-content/plugins/google-analytics-for-wordpress/yst_plugin_tools.php on line 196

RSS 错误:A feed could not be found at http://blogsearch.google.com/blogsearch_feeds?scoring=d&ie=utf-8&num=10&output=rss&partner=wordpress&q=link:http://1.snowson.sinaapp.com

主题 Elegant Box

时间:2012-05-22 下午12:26:00 
标签: IT, SAE, wordpress, 多说

2014-01-11 20:57:41 Migrated From Blogger

120521 三只宠物:狗狗后鬼咪咪

am.FM锄地。

因为看到篇关于滥用免费服务翻墙的文章,让人对GoAgent翻–墙是否应该有了疑问。

今天才明白,想要权威可信的资料,需要搜索论文。
荒唐,我居然一直也没意识到这点。

发现有许多网站是限制公共代理IP的使用的。比用wordpress.com限制注册,维基百科限制编辑。
但使用无—————————-界—————浏览等翻——————–墙软件没问题,以后需要考察。

研究了好长时间各种中文字体。好零乱。

am.有人打奶。
男人,骑木兰式摩托,疑似电动。大塑料饮料瓶5提,2个上窄下粗大玻璃瓶各3提,共11提提即5.5斤牛奶,一斤1.6元,即8.8元。给20元找零11.2元。
田后家,年轻男,骑摩托,塑料瓶大,2斤。

6:15打桩机开工。
整天,有打桩机就在跟前施工,震感很强烈。

120521 三只宠物:狗狗后鬼咪咪

时间:2012-05-21 下午11:09:00 
标签: log

2014-01-11 20:50:50 Migrated From Blogger

英文维基百科中文维基百科百度百科互动百科SCI论文|查资料什么权威可信

英语维基百科计划开始于2001年,至2012年4月3日,英语维基百科已有超过391万个条目,超过5.26亿次编辑,注册用户超过1,655万。
中文维基百科自2002年10月24日正式成立,由非营利组织维基媒体基金会维持运作。截至2012年5月21日10:14(UTC),中文维基百科已拥有471,739条条目。
百度百科测试版于2006年4月20日上线,正式版在2008年4月21日发布。已收录词条4930193个。
互动百科创建于2005年7月18日。截止到2012年3月,互动百科已经发展成为由超过455万用户共同打造的拥有639万词条、64亿文字、677万张图片的百科网站。

最近有看些英文维基百科。发现,在中文互联网上难以找到的信息,在英文维基上很多可以找到。
比较而言,中文维基百科比百度百科权威可信,但词条太少,且有的很短。目前百度百科已经接近500万,互动百科达到600多万,而中文维基百科还不到50万。
英文维基百科相比所有的中文百科较靠谱地多了,有接近400万词条,比较权威可信。

但果壳上有人说,只有论文才可信。又有人说中文论文得核心期刊才可信。再有人说中文的核心期刊也不可信。更有姬十三说只有英文SCI大于5.0才可信度比较高。而这种,比较可信的论文就得花钱,一篇得几十美元。很可怕滴。

如此看来,想要获取较为权威可靠信息,还需要论文学术搜索!
比如http://scholar.google.com/
—————-
姬十三 2011-04-15 02:27:47
中文核心期刊敢靠谱吗?
英文sci也就5.0以上的可信度比较高吧……
小花花
如果真想靠谱…英文wiki也不行啊,前几天要班里做个presentation,老师那叫个千叮咛万嘱咐的绝不能用wiki,最多按照他下面的refer找去原文,但如果原文是只网上发表的那就也不能用…然后他就一直在咒骂wiki这种错误百出的网站贻害了多少人……
作为科普的话,如果就在网上找资料那就得多对照多比较还得有个好使的脑子判断。真要严谨那就花钱吧…..download一篇paper要$31.5我表示摊手
http://www.guokr.com/post/18632/

PubMed文献服务检索系统
PubMed是因特网上使用最广泛的免费MEDLINE,是美国国家医学图书馆(NLM)所属的国家生物技术信息中心(NCBI)于2000年4月开发的,基于WEB的生物医学信息检索系统,它是NCBI Entrez整个数据库查询系统中的一个。
国家知识基础设施(National Knowledge Infrastructure,CNKI)

Republic of China中华民国(等于台湾)

时间:2012-05-21 下午10:38:00 
标签: 百科, 维基百科

2014-01-11 20:39:05 Migrated From Blogger

IETF语言标签维基百科zh-hans简体zh-hant繁体zh-cn大陆简体zh-tw台湾正体zh-sg马新简体zh-hk港澳繁体

zh-sg(马新简体)的sg,疑似只是Singapore的缩写。在维基百科上经常可以看到。
马新简体是指在马来西亚(Malaysia)和新加坡(Singapore)使用的简体汉字。
1976年后新加坡的简体与中国大陆的简体在字体上已经没有区别,仅在用词方式及外来词汇的翻译上有所差异。

zh-hans 简体 Simplified
zh-hant 繁體 Traditional
zh-cn 大陆简体(Simplified and using Mainland Chinese terms)
zh-tw 台灣正體(Traditional and using Taiwanese terms)
zh-sg 马新简体 Singaporean
zh-hk  港澳繁體

Variant’s name变体名     Chinese name  iso
Simplified      简体   zh-hans
Traditional      繁體   zh-hant
Simplified and using Mainland Chinese terms  大陆简体  zh-cn
Traditional and using Taiwanese terms   台灣正體  zh-tw
Simplified and using Singaporean and Malaysian terms 马新简体  zh-sg
Traditional and using Hong Kong and Macau terms  港澳繁體  zh-hk
from:http://en.wikipedia.org/wiki/Chinese_Wikipedia

IETF language tags are abbreviated language codes; for examples: "en" for English, "pt-BR" for Brazilian Portuguese, or "nan-Hant-TW" for Min Nan Chinese as spoken in Taiwan using traditional Han characters.
from:http://en.wikipedia.org/wiki/IETF_language_tag
IETF(互联网工程任务组)语言标签是缩写的语言代码,例如en代表英语,pt-BR代表巴西葡萄牙语,或者"nan-Hant-TW"代表在台湾用繁体汉字的闽南语

A best current practice (BCP) is a de facto, dynamic level of performance in engineering and information technology. It is more flexible than a standard, since techniques and tools are continually evolving.
from:http://en.wikipedia.org/wiki/Best_Current_Practice
BCP(最佳惯例)是在工程和信息技术领域的语言表现方面的事实上的、动态的标准。它比起标准是更灵活的,由于技术和工具的不断发展。

时间:2012-05-21 下午9:46:00 
标签: 中文, 维基百科

2014-01-11 20:34:42 Migrated From Blogger