( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484224{main}( ).../index.php:0
20.0001484576require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.14944100392require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.15094129496include( '/var/www/html/wp-content/themes/twentyfifteen/archive.php ).../template-loader.php:125
50.15094129496get_header( $name = ???, $args = ??? ).../archive.php:19
60.15094129712locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.15094129808load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.15124130352require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.15144137760wp_head( ).../header.php:18
100.15144137760do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.15144137976WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.15144137976WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.15154141392wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.15154141392do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.15154141608WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.15154141608WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.15174267912twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.15184269432wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.15184269432WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.15184269432WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.15184269432_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.15184269752wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.15194270504trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484224{main}( ).../index.php:0
20.0001484576require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.14944100392require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.15094129496include( '/var/www/html/wp-content/themes/twentyfifteen/archive.php ).../template-loader.php:125
50.15094129496get_header( $name = ???, $args = ??? ).../archive.php:19
60.15094129712locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.15094129808load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.15124130352require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.15144137760wp_head( ).../header.php:18
100.15144137760do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.15144137976WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.15144137976WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.15154141392wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.15154141392do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.15154141608WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.15154141608WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.15174267912twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.17724271608wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.17724271608WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.17724271608WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.17724271608_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.17724271928wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.17734272152trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

巧用tmpfs加速你的linux服务器

巧用tmpfs加速你的linux服务器


今天从朋友高春辉那里又学了一招,就是使用tmpfs,我把他消化后用来实现虚拟磁盘来存放squid的缓存文件和php的seesion。速度快不少哦!


默认系统就会加载/dev/shm ,它就是所谓的tmpfs,有人说跟ramdisk(虚拟磁盘),但不一样。象虚拟磁盘一样,tmpfs 可以使用您的 RAM,但它也可以使用您的交换分区来存储。而且传统的虚拟磁盘是个块设备,并需要一个 mkfs 之类的命令才能真正地使用它,tmpfs 是一个文件系统,而不是块设备;您只是安装它,它就可以使用了。


tmpfs有以下优势:
1。动态文件系统的大小,
2。tmpfs 的另一个主要的好处是它闪电般的速度。因为典型的 tmpfs 文件系统会完全驻留在 RAM 中,读写几乎可以是瞬间的。
3。tmpfs 数据在重新启动之后不会保留,因为虚拟内存本质上就是易失的。所以有必要做一些脚本做诸如加载,绑定的操作。


好了讲了一些大道理,大家看的烦了吧,还是讲讲我的应用吧:)


首先在/dev/stm建个tmp文件夹,然后与实际/tmp绑定


mkdir /dev/shm/tmp
chmod 1777 /dev/shm/tmp
mount –bind /dev/shm/tmp /tmp



1。squid的缓存目录设置


vi /etc/squid/squid.conf


修改成
cache_dir ufs /tmp 256 16 256
这里的第一个256表示使用256M内存,我觉得高性能LINUX双效防火墙HOWTO使用ramdisk的方法还不如直接使用tmpfs,至少每次启动不用mkfs,还可以动态改变大小。


然后重启一下服务,ok,现在所有的squid缓存文件都保存倒tmpfs文件系统里了,很快哦。



2。对php性能的优化


对于一个访问量大的以apache+php的网站,可能tmp下的临时文件都会很多,比如seesion或者一些缓存文件,那么你可以把它保存到tmpfs文件。


保存seesion的方法很简单了只要修改php.ini就行了,由于我已经把/dev/stm/tmp与/tmp绑定,所以不改写也行,至于php程序产生的缓存文件那只能改自己的php程序了:)


希望我的这个方法,能对你有所启发。


参考文档:使用虚拟内存(virtual memory,VM)文件系统和绑定安装