( ! ) 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.0000484048{main}( ).../index.php:0
20.0006484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.28184096680require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.28534125672include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.28534125672get_header( $name = ???, $args = ??? ).../single.php:10
60.28534125888locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.28534125984load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.28574126528require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.28594133936wp_head( ).../header.php:18
100.28594133936do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.28594134152WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.28594134152WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.28604137568wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.28604137568do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.28604137784WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.28604137784WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.28624139672twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.28634141192wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.28634141192WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.28634141192WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.28634141192_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.28634147144wp_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.28644266680trigger_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.0000484048{main}( ).../index.php:0
20.0006484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.28184096680require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.28534125672include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.28534125672get_header( $name = ???, $args = ??? ).../single.php:10
60.28534125888locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.28534125984load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.28574126528require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.28594133936wp_head( ).../header.php:18
100.28594133936do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.28594134152WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.28594134152WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.28604137568wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.28604137568do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.28604137784WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.28604137784WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.28624139672twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.31524267784wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.31524267784WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.31524267784WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.31524267784_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.31524268104wp_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.31524268328trigger_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)文件系统和绑定安装


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.