你即将死去!——乔布斯演讲稿

高性能建站

drupal hiphop
http://drupal.stackexchange.com/questions/11738/how-to-speed-up-drupal-7-compiling-php-to-c

http://groups.drupal.org/high-performance
http://groups.drupal.org/node/279093

PHP/Server side tools:
FPM: http://php-fpm.org/ [EN], http://baike.baidu.com/view/4168033.htm [ZH-HANS]
Varnish
APC
NGINX –> Can replace Varnish if configured as reverse proxy
MEMCACHE
SQUID

xhprof, http://drupal.org/project/xhprof –> benchmarking and measuring your performance
FASTER!! Compile to C language: Hiphop Facebook http://drupal.org/node/705962
http://php.webtutor.pl/en/2011/05/17/drupal-hiphop-for-php-vs-apc-benchmark/
http://developers.facebook.com/blog/post/2010/02/02/hiphop-for-php–move-fast/

Pressflow

Drupal modules: Performance and scalability
Boost
“Authenticated Cache”: http://drupal.org/project/authcache
Memcache API and Integration

PHP:
mod_php
nginx(fast-cgi/php-fpm)
apache

fast-cgi 排除处理

Drupal nginx
github.com/perusio/drupal-with-nginx

php fastcgi
pm.max_requests=500 当php接收到500个请求就会重新生成php进程,但是也不能设置太大,如果设置太大的话你可能太多的的请求会耗用太多的进程

PHP加速:
apc
eacc
xcache
zend Optimizer+

apc:
apc.shm_size = 64M 开启缓存php代码的内存
apcstat = 0

网站加速王 Cache 为王
http://www.chinaz.com/web/2012/0111/231417_2.shtml

CND 模块:
origin pull mode
file converyor mode

drupal.org/node/875632

fast 404模块将你的404交给web service 来处理

Drupal 视频播放

以下两个播放器都需要库,请看README. 当你下载了以后。field format会出来相应的选择 但是必须是file:
1. jw_player
库下载: http://www.longtailvideo.com/jw-player/download/
下载好后放到 libraries/jwplayer

2. mediaelement
库下载: http://mediaelementjs.com/
下载好后放到 libraries/mediaelement 默认目录名不是这个。如果不改名是无法使用的. 默认下载下来的文件比较多而且也比较大。但是只有build有用。其它的都是可以删除掉的

功能: 制作一个视频弹窗播放

模块:
1. media 这是一个视频播放器管理工具
2. colorbox 弹窗。
库下载: http://www.jacklmoore.com/colorbox/colorbox.zip放到libraries目录下面

3. media_colorbox 视频弹窗播放
4. mediaelement 播放器. 当时我用过jw_player但是弹窗后无法播放

安装并启用

启用播放器播放,如果不启用会用html5来播放

/admin/config/media/mediaelement

编辑 Video

admin/config/media/file-types/manage/video/file-display

选中 MediaElement Video

在你的field为file的字段选中media colorbox

Bean 模块无法添加数据

当我添加block时出现这样的错误:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 2: INSERT INTO {bean} (vid, delta, label, title, type, view_mode, data) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => test33 [:db_insert_placeholder_2] => test33 [:db_insert_placeholder_3] => test33 [:db_insert_placeholder_4] => home_introduction [:db_insert_placeholder_5] => default [:db_insert_placeholder_6] => a:1:{s:9:"view_mode";s:7:"default";} ) in drupal_write_record() (line 7106 of /var/www/dev/xkzhou/si/includes/common.inc).

Bean Error

Archlinux drush 错误

$ drush
The following restricted PHP modes have non-empty values:            [error]
open_basedir. This configuration is incompatible with drush.  Please
check your configuration settings in /etc/php/php.ini or in your
drush.ini file; see examples/example.drush.ini for details.
file_exists(): open_basedir restriction in effect. File(/etc/drush/drushrc.php) is not within the allowed path(s):                         [warning]
(/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/pear/drush/:/etc/drush/:/root/) context.inc:150
file_exists(): open_basedir restriction in effect. File(/etc/drush/drush5rc.php) is not within the allowed path(s):                        [warning]
(/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/pear/drush/:/etc/drush/:/root/) context.inc:150
is_dir(): open_basedir restriction in effect. File(/usr/share/drush/commands) is not within the allowed path(s):                           [warning]
(/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/pear/drush/:/etc/drush/:/root/) command.inc:1289
Execute a drush command. Run `drush help [command]` to view command-specific help.  Run `drush topic` to read even more documentation.

在Arch Linux中. 安装drush后, 是能正常使用,但是会出现这样的错误

解决办法:
http://drupal.org/node/509506
http://drupal.stackexchange.com/questions/4088/drush-open-basedir-restriction-in-effect-on-media-temple

$cp /etc/php/php.ini ~/.drush/
$vim ~/.bashrc 

//添加
alias drush='/usr/bin/php -c ~/.drush/php.ini /usr/share/pear/drush/drush.php'

//编辑你copy的php.ini
$vim ~/.drush/php.ini

//将open_basedir 设置为空
open_basedir = 

Google 浏览器代理工具

https://chrome.google.com/webstore/detail/proxy-switchy/caehdcpeofiiigpdhbabniblemipncjj

VPN.s HTTP proxy

https://chrome.google.com/webstore/detail/proxy-switchysharp/dpplabbmogkhghncfbfdeeokoefdjegm/related

https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt