-----------------------------------------------------
gd库。编译php的时候报错,error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory
-----------------------------------------------------
gd make过程中报错
转来的,解决的问题是同样的问题
在32位ubuntu9.04上编译php5.2.12,到gd时make出错:
ext/gd/libgd/.libs/gd_png.o: In function `php_gd_gdImageCreateFromPngCtx':
/home/test/php-5.2.12/ext/gd/libgd/gd_png.c:142: undefined reference to `png_check_sig'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] 错误 1
直接下载gd,在gd目录make也类似的错
gcc -g -O2 -o .libs/annotate annotate.o /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib
./.libs/libgd.so /usr/local/lib/libjpeg.so /usr/local/lib/libfreetype.so /usr/local/lib/libpng14.so -lz -lm
./.libs/libgd.so: undefined reference to `png_check_sig'
collect2: ld returned 1 exit status
make[2]: *** [annotate] 错误 1
make[2]:正在离开目录 `/home/test/gd-2.0.35'
make[1]: *** [all-recursive] 错误 1
make[1]:正在离开目录 `/home/test/gd-2.0.35'
make: *** [all] 错误 2
把php版本换为5.2.8也错,而且从上面单独编译gd错来看,与php无关.libpng已编译安装了的
网上搜索不到原因
补充:现在解决了.
可以参见
http://aspn.activestate.com/ASPN/Mail/Message/php-dev/3803631
可以算是php的一个bug,libpng-1.4.0源码中的libpng-1.4.0.txt有说明,已经取消了png_check_sig这个函数,改用png_sig_cmp代替.自从libpng-0.90就已经反对使用png_check_sig函数了.这个帖子中采用修改php源码的方法,编辑ext/gd/libgd/gd_png.c,将
if (!png_check_sig (sig, 8)) { /* bad signature */
换成
if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
但我不知道其他哪些地方有没有这个函数,所以我还是用libpng-1.2.35吧,看libpng-1.2.35.txt,就没有提png_check_sig的事.
编译安装libpng-1.2.35后,php-5.2.12的mak
-----------------------------------------------------
Iperf使用方法与参数说明
Iperf是一个网络性能测试工具。可以测试TCP和UDP带宽质量,可以测量最大TCP带宽,具有多种参数和UDP特性,可以报告带宽,延迟抖动和数据包丢失。Iperf在linux和windows平台均有二进制版本供自由使用。
Iperf was developed by NLANRDAST as a modern alternative for measuring maximum TCP and UDP bandwidth performance. Iperf allows the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss.
Iperf使用方法与参数说明
参数说明
-s 以server模式启动,eg:iperf -s
-c host以client模式启动,host是server端地址,eg:iperf -c 222.35.11.23
通用参数
-f [kmKM] 分别表示以Kbits, Mbits, KBytes, MBytes显示报告,默认以Mbits为单位,eg:iperf -c 222.35.11.23 -f K
-i sec 以秒为单位显示报告间隔,eg:iperf -c 222.35.11.23 -i 2
-l 缓冲区大小,默认是8KB,eg:iperf -c 222.35.11.23 -l 16
-m 显示tcp最大mtu值
-o 将报告和错误信息输出到文件eg:iperf -c 222.35.11.23 -o ciperflog.txt
-p 指定服务器端使用的端口或客户端所连接的端口eg:iperf -s -p 9999;iperf -c 222.35.11.23 -p 9999
-u 使用udp协议
-w 指定TCP窗口大小,默认是8KB
-B 绑定一个主机地址或接口(当主机有多个地址或接口时使用该参数)
-C 兼容旧版本(当server端和client端版本不一样时使用)
-M 设定TCP数据包的最大mtu值
-N 设定TCP不延时
-V 传输ipv6数据包
server专用参数
-D 以服务方式运行iperf,eg:iperf -s -D
-R 停止iperf服务,针对-D,eg:iperf -s -R
client端专用参数
-d 同时进行双向传输测试
-n 指定传输的字节数,eg:iperf -c 222.35.11.23 -n 100000
-r 单独进行双向传输测试
-t 测试时间,默认10秒,eg:iperf -c 222.35.11.23 -t 5
-F 指定需要传输的文件
-T 指定ttl值
应用实例
使用 iperf -s 命令将 Iperf 启动为 server 模式,在客户机上使用 iperf -c启动client模式。
iperf –s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 8.00 KByte (default)
------------------------------------------------------------
iperf -c 59.128.103.56
上面使用服务端和客户端的默认设置进行测试
iperf -s -w 300K
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 300 KByte
------------------------------------------------------------
iperf -c 59.128.103.56 -f K -i 2 -w 300K
设定报告间隔为2秒,服务器端和客户端的TCP窗口都开到300KB
iperf -c 59.128.103.56 -f K -i 2 -w 300K –n 1000000
测试传输约1MB数据
iperf -c 59.128.103.56 -f K -i 2 -w 300K –t 36
测试持续36秒
iperf -c 59.128.103.56 -f K -i 2 -w 300K -n 10400000 –d
测试双向的传输
iperf -c 59.128.103.56 -f K -i 2 -w 300K –u
UDP测试
其中 -i 参数的含义是周期性报告的时间间隔(interval),单位为秒;在上面的例子中,表示每隔2秒报告一次带宽等信息。
启动一个iperf服务器进程
首先要介绍的命令用来启动iperf服务器监听进程以便监听客户端连接的。命令如下:
iperf.exe -s -P 2 -i 5 -p 5999 -f k
这个命令会启动iperf,后续参数用来设定监听5999 端口(默认端口是5001), 限定iperf只允许两个连接,每5秒汇报一次连接情况。连接限制参数(-P参数)非常重要,当两个连接建立后,服务器进程就会退出。如果这个参数设定为0,那么iperf 进程将持续监听端口,并且不限制连接数量。在 Windows主机上键入该命令,会显示出如图A所示界面
图 A
启动一个iperf 客户端连接
iperf 的另一半就是客户端,用来连接到服务器监听端口。比如我们要连接到一台叫做 s-network1.amcs.tld 的服务器,端口为5999,连接60 秒并且每5秒显示一次状态,命令行如下:
iperf.exe -c s-network1.amcs.tld -P 1 -i 5 -p 5999 -f B -t 60 -T 1
命令启动后,s-network1 主机被用来进行网络性能检测。与Jperf GUI 界面提供的漂亮图形不同, iperf只会根据测量参数简单的报告网络带宽状况,在本例中是以 比特为单位(-f 参数)进行带宽表示的。图B显示了远程客户端与s-network1主机间的带宽性能。
图 B
为了应对日常便捷应用的需求,我们可以建立一个 .bat批处理文件,届时填入服务器名称即可实现快速检测。以下为实际使用的拷屏:
C:\jperf\jperf\bin>iperf
Usage: iperf [-s|-c host] [options]
Try `iperf --help' for more information.
C:\jperf\jperf\bin>iperf --help
Usage: iperf [-s|-c host] [options]
iperf [-h|--help] [-v|--version]
Client/Server:
-f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes
-i, --interval # seconds between periodic bandwidth reports
-l, --len #[KM] length of buffer to read or write (default 8 KB)
-m, --print_mss print TCP maximum segment size (MTU - TCP/IP header)
-o, --output <filename> output the report or error message to this specified file
-p, --port # server port to listen on/connect to
-u, --udp use UDP rather than TCP
-w, --window #[KM] TCP window size (socket buffer size)
-B, --bind <host> bind to <host>, an interface or multicast address
-C, --compatibility for use with older versions does not sent extra msgs
-M, --mss # set TCP maximum segment size (MTU - 40 bytes)
-N, --nodelay set TCP no delay, disabling Nagle's Algorithm
-V, --IPv6Version Set the domain to IPv6
Server specific:
-s, --server run in server mode
-D, --daemon run the server as a daemon
-R, --remove remove service in win32
Client specific:
-b, --bandwidth #[KM] for UDP, bandwidth to send at in bits/sec
(default 1 Mbit/sec, implies -u)
-c, --client <host> run in client mode, connecting to <host>
-d, --dualtest Do a bidirectional test simultaneously
-n, --num #[KM] number of bytes to transmit (instead of -t)
-r, --tradeoff Do a bidirectional test individually
-t, --time # time in seconds to transmit for (default 10 secs)
-F, --fileinput <name> input the data to be transmitted from a file
-I, --stdin input the data to be transmitted from stdin
-L, --listenport # port to recieve bidirectional tests back on
-P, --parallel # number of parallel client threads to run
-T, --ttl # time-to-live, for multicast (default 1)
Miscellaneous:
-h, --help print this message and quit
-v, --version print version information and quit
[KM] Indicates options that support a K or M suffix for kilo- or mega-
The TCP window size option can be set by the environment variable
TCP_WINDOW_SIZE. Most other options can be set by an environment variable
IPERF_<long option name>, such as IPERF_BANDWIDTH.
-----------------------------------------------------
解决暴风影音经典版在win7下的关联图标问题
将下载后的stormicl.dll压缩包解压后覆盖原文件,然后重新关联一下文件就解决问题了. 我的做法是再重新安装一遍,然后在要求关联的时候,把这个文件覆盖C:\Program Files\Ringz Studio\Storm Codec 然后点击关联,即可
原文地址:http://bbs.pcbeta.com/viewthread.php?tid=581246&page=1
-----------------------------------------------------
WPA和WPA2加密
EEE 802.11 所制定的是技术性标准 ,Wi-Fi 联盟所制定的是商业化标准 , 而 Wi-Fi 所制定的商业化标准基本上也都符合 IEEE 所制定的技术性标准。 WPA(Wi-Fi Protected Access) 事实上就是由 Wi-Fi 联盟所制定的安全性标准 , 这个商业化标准存在的目的就是为了要支持 IEEE 802.11i 这个以技术为导向的安全性标准。而 WPA2 其实就是 WPA 的第二个版本。 WPA 之所以会出现两个版本的原因就在于 Wi-Fi 联盟的商业化运作。
我们知道 802.11i 这个任务小组成立的目的就是为了打造一个更安全的无线局域网 , 所以在加密项目里规范了两个新的安全加密协定 – TKIP 与 CCMP 。其中 TKIP 虽然针对 WEP 的弱点作了重大的改良 , 但保留了 RC4 演算法和基本架构 , 言下之意 ,TKIP 亦存在着 RC4 本身所隐含的弱点。因而 802.11i 再打造一个全新、安全性更强、更适合应用在无线局域网环境的加密协定 -CCMP 。所以在 CCMP 就绪之前 ,TKIP 就已经完成了。但是要等到 CCMP 完成 , 再发布完整的 IEEE 802.11i 标准 , 可能尚需一段时日 , 而 Wi-Fi 联盟为了要使得新的安全性标准能够尽快被布署 , 以消弭使用者对无线局域网安全性的疑虑 , 进而让无线局域网的市场可以迅速扩展开来 , 因而使用已经完成 TKIP 的 IEEE 802.11i 第三版草案 (IEEE 802.11i draft 3) 为基准 , 制定了 WPA 。而于 IEEE 完成并公布 IEEE 802.11i 无线局域网安全标准后 ,Wi-Fi 联盟也随即公布了 WPA 第 2 版 (WPA 2) 。所以:
WPA = IEEE 802.11i draft 3 = IEEE 802.1X/EAP + WEP( 选择性项目 )/TKIP
WPA2 = IEEE 802.11i = IEEE 802.1X/EAP + WEP( 选择性项目 )/TKIP/CCMP
( 有些无线网路设备中会以 AES 、 AES-CCMP 的字眼来取代 CCMP)
在有些无线网路设备的规格中会看到像 WPA-Enterprise / WPA2-Enterprise 以及 WPA-Personal / WPA2-Personal 的字眼 , 其实 WPA-Enterprise / WPA2-Enterprise 就是 WPA / WPA2 ; WPA-Personal / WPA2-Personal 其实就是 WPA-PSK / WPA2-PSK, 也就是以 ”pre-share key” 或 ” passphrase” 的验证 (authentication) 模式来代替 IEEE 802.1X/EAP 的验证模式 ,PSK 模式下不须使用验证服务器 ( 例如 RADIUS Server), 所以特别适合家用或 SOHO 的使用者。
简单点说,WPA是WEP到WP2的过渡品。
如果要说区别,那么最主要还是在加密算法上。
WEP:RC4静态密钥
WPA:用户认证,比如LEAP,PEAP
WPA2:AES加密(AES最厉害)
-----------------------------------------------------