2013-10-11 11:05 Friday  

Nginx上传文件出现一个错误:413 Request Entity Too Large,百度了一下,原来是文件太大了。

原因上传文件超过最大值,修改nginx.conf的值就可以解决了。

client_max_body_size 2M

改为

client_max_body_size 5M;

阅读全文>>

2012-2-4 9:10 Saturday  
虽然我基本上不用,但是我想熟悉iis而不熟悉apache的童鞋应该用得到的,网址是http://www.wangqu.org/htaccess/,速度有点慢,你要耐心等等~

阅读全文>>

2012-1-30 18:38 Monday  

当在php.ini中开启extension=php_mssql.dll及extension=php_pdo_mssql.dll,重启服务器 后在phpinfo()中还是没有mssql扩展,这时候需要将以上两个dll文件级php5nsapi.dll复制到 c:\windows\system32下面,或者将 php   php/ext 加入到系统环境变量中即可。。

 

MMD...

阅读全文>>

解决方案,两次urlencode关键词即可。

阅读全文>>

2012-1-30 18:31 Monday  

在网上搜索了很多关于ffmpeg-php的文章。大部分都是在linux下配置的文章。介绍window配置的内容相当的少,通过自己努力终于在windows下配置成功。特写下文章希望对大家做视频开发有用。

首先介绍下我使用的集成环境wamp。

PHP: php5.2.6

Apache: apache2.2.8

1.下载ffmpeg-php:http://sergey89.ru/files/ffmpeg-php-win32-all.zip

2. 解压ffmpeg-php-win32-all.zip 后有下面几个文件:

     avcodec-51.dll

     avformat-51.dll

     avutil-49.dll

     php_ffmpeg.dll

     pthreadGC2.dll

3. 将四个文件拷贝到windows\system32文件夹下面(小插曲:之前自己再配置时候按照网上的文章只拷贝两个文件 avcodec-51.dll, avformat-51.dll到这个文件,结果发现并不能配置成功。后来将后面avutil-49.dll, pthreadGC2.dll全部拷贝过去就成功了,很有可能这四个文件是有一定关联使用的。)

     avcodec-51.dll, avformat-51.dll, avutil-49.dll, pthreadGC2.dll

4. 然后需要到apache\bin文件下找到php.ini文件下允许使用dll文件加入extension=php_ffmpeg.dll 并允许     extension=php_gd2.dll, extension=php_gettext.dll这两个
改动后如下(去掉前面的分号就代表允许执行)

    extension=php_gd2.dll
    extension=php_gettext.dll
    extension=php_ffmpeg.dll

5. 重新启动wamp后使用phpinfo()函数看到一下信息配置:   //我两个环境一个apache一个IIS,iis不用重启就生效了,apache没试不知道, add by aboc

ffmpeg


ffmpeg-php version 0.5.2.1
libavcodec version Lavc51.43.0
libavformat version Lavf51.12.2
ffmpeg-php gd support enabled

 以上就表明ffmpeg在php环境中配置成功了。

6. 下面我们建立一个php的页面来测试是不是可以使用ffmpeg的一些函数功能。建立testvideo.php文件

 代码如下:

<?php

extension_loaded('ffmpeg');  //可不要

$ffmpegInstance = new ffmpeg_movie('C:\wamp\www\top10.mp4'); //这里要用绝对路径
echo "getDuration: " . $ffmpegInstance->getDuration()."<br>" .
"getFrameCount: " . $ffmpegInstance->getFrameCount()."<br>" .
"getFrameRate: " . $ffmpegInstance->getFrameRate()."<br>" .
"getFilename: " . $ffmpegInstance->getFilename()."<br>" .
"getComment: " . $ffmpegInstance->getComment()."<br>" .
"getTitle: " . $ffmpegInstance->getTitle()."<br>" .
"getAuthor: " . $ffmpegInstance->getAuthor()."<br>" .
"getCopyright: " . $ffmpegInstance->getCopyright()."<br>" .
"getArtist: " . $ffmpegInstance->getArtist()."<br>" .
"getGenre: " . $ffmpegInstance->getGenre()."<br>" .
"getTrackNumber: " . $ffmpegInstance->getTrackNumber()."<br>" .
"getYear: " . $ffmpegInstance->getYear()."<br>" .
"getFrameHeight: " . $ffmpegInstance->getFrameHeight()."<br>" .
"getFrameWidth: " . $ffmpegInstance->getFrameWidth()."<br>" .
"getPixelFormat: " . $ffmpegInstance->getPixelFormat()."<br>" .
"getBitRate: " . $ffmpegInstance->getBitRate()."<br>" .
"getVideoBitRate: " . $ffmpegInstance->getVideoBitRate()."<br>" .
"getAudioBitRate: " . $ffmpegInstance->getAudioBitRate()."<br>" .
"getAudioSampleRate: " . $ffmpegInstance->getAudioSampleRate()."<br>" .
"getVideoCodec: " . $ffmpegInstance->getVideoCodec()."<br>" .
"getAudioCodec: " . $ffmpegInstance->getAudioCodec()."<br>" .
"getAudioChannels: " . $ffmpegInstance->getAudioChannels()."<br>" .
"hasAudio: " . $ffmpegInstance->hasAudio();
?>

 7.执行后如果拿到视频的一些信息如下就表示环境配置成功了,那我们就可以开始开发我们的视频转换了。

执行结果:

getDuration: 811.13336181641
getFrameCount: 12167
getFrameRate: 15
getFilename: C:\wamp\www\top10.mp4
getComment:
getTitle:
getAuthor:
getCopyright:
getArtist:
getGenre:
getTrackNumber: 0
getYear: 0
getFrameHeight: 240
getFrameWidth: 320
getPixelFormat: yuv420p
getBitRate: 269769
getVideoBitRate:
getAudioBitRate:
getAudioSampleRate: 48000
getVideoCodec: mpeg4
getAudioCodec: mpeg4aac
getAudioChannels: 2
hasAudio: 1

 

转自:http://blog.csdn.net/koala_swnu/archive/2010/04/13/5482983.aspx

 

视频截图的话如下方法: //add by aboc

$ff_frame = $ffmpegInstance->getFrame(rand(1,$ffmpegInstance->getFrameCount())); //随机截取某一帧
$gd_image = $ff_frame->toGDImage();
imagejpeg($gd_image,'t.jpg');
imagedestroy($gd_image);

echo '<img src="t.jpg" />';

2012-1-30 18:25 Monday  

1.windows下

去掉extension=php_soap.dll前的;号重启iis或是apache即。

2.centos下

  通过yum安装  yum install php-soap 然后重启apache。

中途如果有报thread.error: can't start new thread 这个错误,则用如下方法解决

编辑 /etc/yum/pluginconf.d/fastestmirror.conf

将enabled=1修改为enabled=0,禁用该功能就可以了。

 通过重编译来扩展,则进行如下操作,来源http://www.9enjoy.com/php5-soap-make/

切换到php5安装目录的soap目录
cd /soft/php-5.2.8/ext/soap
视php安装目录定
/usr/local/php5/bin/phpize
编译soap.so
./configure --with-php-config=/usr/local/php5/bin/php-config --enable-soap
make
make install

Installing shared extensions:     /usr/local/php5/lib/php/extensions/no-debug-zts-20060613/
提示编译后的soap.so文件保存在了/usr/local/php5/lib/php/extensions/no-debug-zts-20060613/目录下。

修改php.ini
vi /usr/local/apache2.2.0/conf/php.ini

如 果之前没有安装过extension,则需要将extension_dir = "./"改为extension_dir = "/usr/local/php5/lib/php/extensions/no-debug-zts-20060613/",如果已经装过,这步之前就 已经改过了。
再其后面加一句:
extension = "soap.so"

重新启动apache,在phpinfo中就有soap的信息了。
Soap Client  enabled  
Soap Server  enabled  

在另一台在phpsize时提示了一些错误,不过不影响之后的编译安装。
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "zh_CN.GB2312:en_US:en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "zh_CN.GB2312:en_US:en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
2012-1-30 18:25 Monday  

可以把error.html设成404的内容,造成页面不存在的假像。

ErrorDocument 403 /error.html  
<Limit GET HEAD POST>
order allow,deny
deny from 58.14
deny from 58.15
deny from 58.16
deny from 58.17
deny from 58.18
deny from 58.19
deny from 58.20
deny from 58.21
deny from 58.22
deny from 58.23
deny from 58.24
deny from 58.25
deny from 58.30
deny from 58.31
deny from 58.32
deny from 58.33
deny from 58.34
deny from 58.35
deny from 58.36
deny from 58.37
deny from 58.38
deny from 58.39
deny from 58.40
deny from 58.41
deny from 58.42
deny from 58.43
deny from 58.44
deny from 58.45
deny from 58.46
deny from 58.47
deny from 58.48
deny from 58.49
deny from 58.50
deny from 58.51
deny from 58.52
deny from 58.53
deny from 58.54
deny from 58.55
deny from 58.56
deny from 58.57
deny from 58.58
deny from 58.59
deny from 58.60
deny from 58.61
deny from 58.62
deny from 58.63
deny from 58.66
deny from 58.67
deny from 58.82
deny from 58.83
deny from 58.87
deny from 58.100
deny from 58.101
deny from 58.116
deny from 58.117
deny from 58.118
deny from 58.119
deny from 58.128
deny from 58.129
deny from 58.130
deny from 58.131
deny from 58.132
deny from 58.133
deny from 58.134
deny from 58.135
deny from 58.144
deny from 58.192
deny from 58.193
deny from 58.194
deny from 58.195
deny from 58.196
deny from 58.197
deny from 58.200
deny from 58.201
deny from 58.202
deny from 58.203
deny from 58.204
deny from 58.205
deny from 58.206
deny from 58.207
deny from 58.208
deny from 58.209
deny from 58.210
deny from 58.211
deny from 58.212
deny from 58.213
deny from 58.214
deny from 58.215
deny from 58.216
deny from 58.217
deny from 58.218
deny from 58.219
deny from 58.220
deny from 58.221
deny from 58.222
deny from 58.223
deny from 58.240
deny from 58.241
deny from 58.242
deny from 58.243
deny from 58.244
deny from 58.245
deny from 58.246
deny from 58.247
deny from 58.248
deny from 58.249
deny from 58.250
deny from 58.251
deny from 58.252
deny from 58.253
deny from 58.254
deny from 58.255
deny from 59.32
deny from 59.33
deny from 59.34
deny from 59.35
deny from 59.36
deny from 59.37
deny from 59.38
deny from 59.39
deny from 59.40
deny from 59.41
deny from 59.42
deny from 59.43
deny from 59.44
deny from 59.45
deny from 59.46
deny from 59.47
deny from 59.48
deny from 59.49
deny from 59.50
deny from 59.51
deny from 59.52
deny from 59.53
deny from 59.54
deny from 59.55
deny from 59.56
deny from 59.57
deny from 59.58
deny from 59.59
deny from 59.60
deny from 59.61
deny from 59.62
deny from 59.63
deny from 59.64
deny from 59.65
deny from 59.66
deny from 59.67
deny from 59.68
deny from 59.69
deny from 59.70
deny from 59.71
deny from 59.72
deny from 59.73
deny from 59.74
deny from 59.75
deny from 59.76
deny from 59.77
deny from 59.78
deny from 59.79
deny from 59.80
deny from 59.81
deny from 59.82
deny from 59.83
deny from 59.107
deny from 59.108
deny from 59.109
deny from 59.151
deny from 59.191
deny from 60.13
deny from 60.14
deny from 60.15
deny from 60.16
deny from 60.17
deny from 60.18
deny from 60.19
deny from 60.20
deny from 60.21
deny from 60.22
deny from 60.23
deny from 60.24
deny from 60.25
deny from 60.26
deny from 60.27
deny from 60.28
deny from 60.29
deny from 60.30
deny from 60.31
deny from 60.55
deny from 60.63
deny from 60.160
deny from 60.161
deny from 60.162
deny from 60.163
deny from 60.164
deny from 60.165
deny from 60.166
deny from 60.167
deny from 60.168
deny from 60.169
deny from 60.170
deny from 60.171
deny from 60.172
deny from 60.173
deny from 60.174
deny from 60.175
deny from 60.176
deny from 60.177
deny from 60.178
deny from 60.179
deny from 60.180
deny from 60.181
deny from 60.182
deny from 60.183
deny from 60.184
deny from 60.185
deny from 60.186
deny from 60.187
deny from 60.188
deny from 60.189
deny from 60.190
deny from 60.191
deny from 60.194
deny from 60.195
deny from 60.200
deny from 60.201
deny from 60.202
deny from 60.203
deny from 60.204
deny from 60.208
deny from 60.209
deny from 60.210
deny from 60.211
deny from 60.212
deny from 60.213
deny from 60.214
deny from 60.215
deny from 60.216
deny from 60.217
deny from 60.218
deny from 60.219
deny from 60.220
deny from 60.221
deny from 60.222
deny from 60.223
deny from 60.232
deny from 60.233
deny from 60.255
deny from 61.14
deny from 61.14
deny from 61.28
deny from 61.29
deny from 61.45
deny from 61.47
deny from 61.48
deny from 61.49
deny from 61.50
deny from 61.51
deny from 61.52
deny from 61.53
deny from 61.54
deny from 61.55
deny from 61.128
deny from 61.129
deny from 61.130
deny from 61.131
deny from 61.132
deny from 61.133
deny from 61.134
deny from 61.135
deny from 61.136
deny from 61.137
deny from 61.138
deny from 61.139
deny from 61.140
deny from 61.141
deny from 61.142
deny from 61.143
deny from 61.144
deny from 61.145
deny from 61.146
deny from 61.147
deny from 61.148
deny from 61.149
deny from 61.150
deny from 61.151
deny from 61.152
deny from 61.153
deny from 61.154
deny from 61.155
deny from 61.156
deny from 61.157
deny from 61.158
deny from 61.159
deny from 61.160
deny from 61.161
deny from 61.161
deny from 61.161
deny from 61.162
deny from 61.163
deny from 61.164
deny from 61.165
deny from 61.166
deny from 61.167
deny from 61.168
deny from 61.169
deny from 61.170
deny from 61.171
deny from 61.172
deny from 61.173
deny from 61.174
deny from 61.175
deny from 61.176
deny from 61.177
deny from 61.178
deny from 61.179
deny from 61.180
deny from 61.181
deny from 61.182
deny from 61.183
deny from 61.184
deny from 61.185
deny from 61.186
deny from 61.187
deny from 61.188
deny from 61.189
deny from 61.190
deny from 61.191
deny from 61.216
deny from 61.232
deny from 61.233
deny from 61.234
deny from 61.235
deny from 61.236
deny from 61.237
deny from 61.240
deny from 61.241
deny from 61.242
deny from 61.243
deny from 62.159
deny from 62.159
deny from 63.162
deny from 64.34
deny from 80.146
deny from 80.255
deny from 121.4
deny from 121.5
deny from 121.8
deny from 121.9
deny from 121.10
deny from 121.11
deny from 121.12
deny from 121.13
deny from 121.14
deny from 121.15
deny from 121.16
deny from 121.17
deny from 121.18
deny from 121.19
deny from 121.20
deny from 121.21
deny from 121.22
deny from 121.23
deny from 121.24
deny from 121.25
deny from 121.26
deny from 121.27
deny from 121.28
deny from 121.29
deny from 121.32
deny from 121.33
deny from 121.34
deny from 121.35
deny from 121.36
deny from 121.40
deny from 121.41
deny from 121.42
deny from 121.43
deny from 122.0
deny from 122.1
deny from 122.2
deny from 122.3
deny from 122.4
deny from 122.5
deny from 122.6
deny from 122.7
deny from 122.8
deny from 122.9
deny from 122.10
deny from 122.11
deny from 122.12
deny from 122.13
deny from 122.14
deny from 122.15
deny from 122.16
deny from 122.17
deny from 122.18
deny from 122.19
deny from 122.20
deny from 122.21
deny from 122.22
deny from 122.23
deny from 122.24
deny from 122.25
deny from 122.26
deny from 122.27
deny from 122.28
deny from 122.29
deny from 122.30
deny from 122.31
deny from 122.32
deny from 122.33
deny from 122.34
deny from 122.35
deny from 122.36
deny from 122.37
deny from 122.38
deny from 122.39
deny from 122.40
deny from 122.41
deny from 122.42
deny from 122.43
deny from 122.44
deny from 122.45
deny from 122.46
deny from 122.47
deny from 122.48
deny from 122.49
deny from 122.50
deny from 122.51
deny from 122.52
deny from 122.53
deny from 122.54
deny from 122.55
deny from 122.56
deny from 122.57
deny from 122.58
deny from 122.59
deny from 122.60
deny from 122.61
deny from 122.62
deny from 122.63
deny from 122.64
deny from 122.65
deny from 122.66
deny from 122.67
deny from 122.68
deny from 122.69
deny from 122.70
deny from 122.71
deny from 122.72
deny from 122.73
deny from 122.74
deny from 122.75
deny from 122.76
deny from 122.77
deny from 122.78
deny from 122.79
deny from 122.80
deny from 122.81
deny from 122.82
deny from 122.83
deny from 122.84
deny from 122.85
deny from 122.86
deny from 122.87
deny from 122.88
deny from 122.89
deny from 122.90
deny from 122.91
deny from 122.92
deny from 122.93
deny from 122.94
deny from 122.95
deny from 122.96
deny from 122.97
deny from 122.98
deny from 122.99
deny from 122.100
deny from 122.101
deny from 122.102
deny from 122.103
deny from 122.104
deny from 122.105
deny from 122.106
deny from 122.107
deny from 122.108
deny from 122.109
deny from 122.110
deny from 122.111
deny from 122.112
deny from 122.113
deny from 122.114
deny from 122.115
deny from 122.116
deny from 122.117
deny from 122.118
deny from 122.119
deny from 122.120
deny from 122.121
deny from 122.122
deny from 122.123
deny from 122.124
deny from 122.125
deny from 122.126
deny from 122.127
deny from 122.128
deny from 122.129
deny from 122.130
deny from 122.131
deny from 122.132
deny from 122.133
deny from 122.134
deny from 122.135
deny from 122.136
deny from 122.137
deny from 122.138
deny from 122.139
deny from 122.140
deny from 122.141
deny from 122.142
deny from 122.143
deny from 122.144
deny from 122.145
deny from 122.146
deny from 122.147
deny from 122.148
deny from 122.149
deny from 122.150
deny from 122.151
deny from 122.152
deny from 122.153
deny from 122.154
deny from 122.155
deny from 122.156
deny from 122.157
deny from 122.158
deny from 122.159
deny from 122.160
deny from 122.161
deny from 122.162
deny from 122.163
deny from 122.164
deny from 122.165
deny from 122.166
deny from 122.167
deny from 122.168
deny from 122.169
deny from 122.170
deny from 122.171
deny from 122.172
deny from 122.173
deny from 122.174
deny from 122.175
deny from 122.176
deny from 122.177
deny from 122.178
deny from 122.179
deny from 122.180
deny from 122.181
deny from 122.182
deny from 122.183
deny from 122.184
deny from 122.185
deny from 122.186
deny from 122.187
deny from 122.188
deny from 122.189
deny from 122.190
deny from 122.191
deny from 122.192
deny from 122.193
deny from 122.194
deny from 122.195
deny from 122.196
deny from 122.197
deny from 122.198
deny from 122.199
deny from 122.200
deny from 122.201
deny from 122.202
deny from 122.203
deny from 122.204
deny from 122.205
deny from 122.206
deny from 122.207
deny from 122.208
deny from 122.209
deny from 122.210
deny from 122.211
deny from 122.212
deny from 122.213
deny from 122.214
deny from 122.215
deny from 122.216
deny from 122.217
deny from 122.218
deny from 122.219
deny from 122.220
deny from 122.221
deny from 122.222
deny from 122.223
deny from 122.224
deny from 122.225
deny from 122.226
deny from 122.227
deny from 122.228
deny from 122.229
deny from 122.230
deny from 122.231
deny from 122.232
deny from 122.233
deny from 122.234
deny from 122.235
deny from 122.236
deny from 122.237
deny from 122.238
deny from 122.239
deny from 122.240
deny from 122.241
deny from 122.242
deny from 122.243
deny from 122.244
deny from 122.245
deny from 122.246
deny from 122.247
deny from 122.248
deny from 122.249
deny from 122.250
deny from 122.251
deny from 122.252
deny from 122.253
deny from 122.254
deny from 122.255
deny from 124.6
deny from 124.16
deny from 124.17
deny from 124.20
deny from 124.21
deny from 124.29
deny from 124.40
deny from 124.42
deny from 124.47
deny from 124.64
deny from 124.65
deny from 124.72
deny from 124.73
deny from 124.74
deny from 124.75
deny from 124.76
deny from 124.77
deny from 124.78
deny from 124.79
deny from 124.88
deny from 124.89
deny from 124.90
deny from 124.91
deny from 124.92
deny from 124.93
deny from 124.94
deny from 124.95
deny from 124.108
deny from 124.112
deny from 124.113
deny from 124.114
deny from 124.115
deny from 124.116
deny from 124.117
deny from 124.118
deny from 124.119
deny from 124.128
deny from 124.129
deny from 124.130
deny from 124.131
deny from 124.132
deny from 124.133
deny from 124.134
deny from 124.135
deny from 124.147
deny from 124.156
deny from 124.160
deny from 124.161
deny from 124.162
deny from 124.172
deny from 124.173
deny from 124.192
deny from 124.193
deny from 124.196
deny from 124.200
deny from 124.201
deny from 124.202
deny from 124.203
deny from 124.204
deny from 124.205
deny from 124.206
deny from 124.207
deny from 124.220
deny from 124.221
deny from 124.222
deny from 124.223
deny from 124.224
deny from 124.226
deny from 124.227
deny from 124.228
deny from 124.229
deny from 124.230
deny from 124.231
deny from 124.232
deny from 124.233
deny from 124.240
deny from 124.242
deny from 124.243
deny from 124.248
deny from 124.249
deny from 124.250
deny from 124.251
deny from 124.254
deny from 125.31
deny from 125.32
deny from 125.33
deny from 125.34
deny from 125.35
deny from 125.36
deny from 125.37
deny from 125.38
deny from 125.39
deny from 125.40
deny from 125.41
deny from 125.42
deny from 125.43
deny from 125.44
deny from 125.45
deny from 125.46
deny from 125.47
deny from 125.58
deny from 125.62
deny from 125.64
deny from 125.65
deny from 125.66
deny from 125.67
deny from 125.68
deny from 125.69
deny from 125.70
deny from 125.71
deny from 125.72
deny from 125.73
deny from 125.74
deny from 125.75
deny from 125.76
deny from 125.77
deny from 125.78
deny from 125.79
deny from 125.80
deny from 125.81
deny from 125.82
deny from 125.83
deny from 125.84
deny from 125.85
deny from 125.86
deny from 125.87
deny from 125.88
deny from 125.89
deny from 125.90
deny from 125.91
deny from 125.92
deny from 125.93
deny from 125.94
deny from 125.95
deny from 125.96
deny from 125.97
deny from 125.98
deny from 125.104
deny from 125.105
deny from 125.106
deny from 125.107
deny from 125.108
deny from 125.109
deny from 125.110
deny from 125.111
deny from 125.112
deny from 125.113
deny from 125.114
deny from 125.115
deny from 125.116
deny from 125.117
deny from 125.118
deny from 125.119
deny from 125.120
deny from 125.121
deny from 125.122
deny from 125.123
deny from 125.124
deny from 125.125
deny from 125.126
deny from 125.127
deny from 125.171
deny from 125.208
deny from 125.210
deny from 125.213
deny from 125.215
deny from 125.216
deny from 125.217
deny from 125.218
deny from 125.219
deny from 125.220
deny from 125.221
deny from 125.222
deny from 125.223
deny from 125.254
deny from 134.196
deny from 147.243
deny from 159.226
deny from 161.207
deny from 162.105
deny from 166.111
deny from 167.139
deny from 168.160
deny from 192.83
deny from 192.124
deny from 192.188
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 195.112
deny from 195.112
deny from 195.112
deny from 195.112
deny from 195.112
deny from 195.112
deny from 195.112
deny from 195.112
deny from 198.17
deny from 202.0
deny from 202.2
deny from 202.4
deny from 202.4
deny from 202.8
deny from 202.10
deny from 202.14
deny from 202.14
deny from 202.20
deny from 202.22
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.41
deny from 202.41
deny from 202.41
deny from 202.43
deny from 202.46
deny from 202.46
deny from 202.60
deny from 202.63
deny from 202.69
deny from 202.69
deny from 202.70
deny from 202.70
deny from 202.74
deny from 202.75
deny from 202.77
deny from 202.85
deny from 202.89
deny from 202.90
deny from 202.90
deny from 202.90
deny from 202.91
deny from 202.91
deny from 202.91
deny from 202.92
deny from 202.92
deny from 202.93
deny from 202.93
deny from 202.94
deny from 202.95
deny from 202.95
deny from 202.96
deny from 202.97
deny from 202.98
deny from 202.99
deny from 202.100
deny from 202.101
deny from 202.102
deny from 202.103
deny from 202.104
deny from 202.105
deny from 202.106
deny from 202.107
deny from 202.108
deny from 202.109
deny from 202.110
deny from 202.111
deny from 202.112
deny from 202.113
deny from 202.114
deny from 202.115
deny from 202.116
deny from 202.117
deny from 202.118
deny from 202.119
deny from 202.120
deny from 202.120
deny from 202.121
deny from 202.122
deny from 202.122
deny from 202.122
deny from 202.122
deny from 202.122
deny from 202.123
deny from 202.125
deny from 202.127
deny from 202.127
deny from 202.127
deny from 202.127
deny from 202.127
deny from 202.127
deny from 202.130
deny from 202.130
deny from 202.131
deny from 202.131
deny from 202.131
deny from 202.136
deny from 202.136
deny from 202.136
deny from 202.141
deny from 202.142
deny from 202.143
deny from 202.148
deny from 202.149
deny from 202.149
deny from 202.150
deny from 202.152
deny from 202.153
deny from 202.158
deny from 202.160
deny from 202.164
deny from 202.165
deny from 202.168
deny from 202.170
deny from 202.170
deny from 202.173
deny from 202.173
deny from 202.176
deny from 202.179
deny from 202.180
deny from 202.181
deny from 202.189
deny from 202.192
deny from 202.192
deny from 202.193
deny from 202.194
deny from 202.195
deny from 202.196
deny from 202.197
deny from 202.198
deny from 202.199
deny from 202.200
deny from 202.201
deny from 202.202
deny from 202.203
deny from 202.204
deny from 202.205
deny from 202.206
deny from 202.207
deny from 203.79
deny from 203.80
deny from 203.81
deny from 203.83
deny from 203.86
deny from 203.88
deny from 203.88
deny from 203.89
deny from 203.90
deny from 203.90
deny from 203.91
deny from 203.91
deny from 203.91
deny from 203.92
deny from 203.92
deny from 203.93
deny from 203.94
deny from 203.95
deny from 203.95
deny from 203.98
deny from 203.98
deny from 203.98
deny from 203.98
deny from 203.99
deny from 203.99
deny from 203.100
deny from 203.100
deny from 203.100
deny from 203.110
deny from 203.118
deny from 203.119
deny from 203.128
deny from 203.128
deny from 203.130
deny from 203.132
deny from 203.134
deny from 203.135
deny from 203.135
deny from 203.142
deny from 203.148
deny from 203.152
deny from 203.156
deny from 203.158
deny from 203.161
deny from 203.166
deny from 203.171
deny from 203.174
deny from 203.175
deny from 203.175
deny from 203.184
deny from 203.187
deny from 203.190
deny from 203.191
deny from 203.191
deny from 203.191
deny from 203.192
deny from 203.194
deny from 203.196
deny from 203.207
deny from 203.208
deny from 203.208
deny from 203.209
deny from 203.212
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 208.18
deny from 210.5
deny from 210.5
deny from 210.12
deny from 210.13
deny from 210.14
deny from 210.14
deny from 210.15
deny from 210.16
deny from 210.21
deny from 210.22
deny from 210.25
deny from 210.26
deny from 210.27
deny from 210.28
deny from 210.29
deny from 210.30
deny from 210.31
deny from 210.31
deny from 210.32
deny from 210.33
deny from 210.34
deny from 210.35
deny from 210.36
deny from 210.37
deny from 210.38
deny from 210.39
deny from 210.40
deny from 210.41
deny from 210.42
deny from 210.43
deny from 210.44
deny from 210.45
deny from 210.46
deny from 210.47
deny from 210.51
deny from 210.52
deny from 210.53
deny from 210.56
deny from 210.72
deny from 210.73
deny from 210.74
deny from 210.75
deny from 210.76
deny from 210.77
deny from 210.78
deny from 210.79
deny from 210.79
deny from 210.82
deny from 210.83
deny from 210.87
deny from 210.185
deny from 210.192
deny from 210.211
deny from 211.64
deny from 211.65
deny from 211.66
deny from 211.67
deny from 211.68
deny from 211.69
deny from 211.70
deny from 211.71
deny from 211.80
deny from 211.81
deny from 211.82
deny from 211.83
deny from 211.84
deny from 211.85
deny from 211.86
deny from 211.87
deny from 211.88
deny from 211.89
deny from 211.90
deny from 211.91
deny from 211.92
deny from 211.93
deny from 211.94
deny from 211.95
deny from 211.96
deny from 211.97
deny from 211.98
deny from 211.99
deny from 211.100
deny from 211.101
deny from 211.102
deny from 211.103
deny from 211.136
deny from 211.137
deny from 211.138
deny from 211.139
deny from 211.140
deny from 211.141
deny from 211.142
deny from 211.143
deny from 211.144
deny from 211.145
deny from 211.146
deny from 211.147
deny from 211.148
deny from 211.149
deny from 211.150
deny from 211.151
deny from 211.152
deny from 211.153
deny from 211.154
deny from 211.155
deny from 211.156
deny from 211.157
deny from 211.158
deny from 211.159
deny from 211.160
deny from 211.161
deny from 211.162
deny from 211.163
deny from 211.164
deny from 211.165
deny from 211.166
deny from 211.167
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.184
deny from 216.139
deny from 216.179
deny from 217.8
deny from 217.243
deny from 217.244
deny from 218.0
deny from 218.1
deny from 218.2
deny from 218.3
deny from 218.4
deny from 218.5
deny from 218.6
deny from 218.7
deny from 218.8
deny from 218.9
deny from 218.10
deny from 218.11
deny from 218.12
deny from 218.13
deny from 218.14
deny from 218.15
deny from 218.16
deny from 218.17
deny from 218.18
deny from 218.19
deny from 218.20
deny from 218.21
deny from 218.22
deny from 218.23
deny from 218.24
deny from 218.25
deny from 218.26
deny from 218.27
deny from 218.28
deny from 218.29
deny from 218.30
deny from 218.31
deny from 218.56
deny from 218.57
deny from 218.58
deny from 218.59
deny from 218.60
deny from 218.61
deny from 218.62
deny from 218.63
deny from 218.64
deny from 218.65
deny from 218.66
deny from 218.67
deny from 218.68
deny from 218.69
deny from 218.70
deny from 218.71
deny from 218.72
deny from 218.73
deny from 218.74
deny from 218.75
deny from 218.76
deny from 218.77
deny from 218.78
deny from 218.79
deny from 218.80
deny from 218.81
deny from 218.82
deny from 218.83
deny from 218.84
deny from 218.85
deny from 218.86
deny from 218.87
deny from 218.88
deny from 218.89
deny from 218.90
deny from 218.91
deny from 218.92
deny from 218.93
deny from 218.94
deny from 218.95
deny from 218.96
deny from 218.97
deny from 218.98
deny from 218.99
deny from 218.104
deny from 218.105
deny from 218.106
deny from 218.107
deny from 218.108
deny from 218.109
deny from 218.185
deny from 218.192
deny from 218.193
deny from 218.194
deny from 218.195
deny from 218.196
deny from 218.197
deny from 218.198
deny from 218.199
deny from 218.200
deny from 218.201
deny from 218.202
deny from 218.203
deny from 218.204
deny from 218.205
deny from 218.206
deny from 218.207
deny from 218.240
deny from 218.241
deny from 218.242
deny from 218.243
deny from 218.244
deny from 218.245
deny from 218.246
deny from 218.247
deny from 218.249
deny from 219.72
deny from 219.82
deny from 219.128
deny from 219.129
deny from 219.130
deny from 219.131
deny from 219.132
deny from 219.133
deny from 219.134
deny from 219.135
deny from 219.136
deny from 219.137
deny from 219.138
deny from 219.139
deny from 219.140
deny from 219.141
deny from 219.142
deny from 219.143
deny from 219.144
deny from 219.145
deny from 219.146
deny from 219.147
deny from 219.148
deny from 219.149
deny from 219.150
deny from 219.151
deny from 219.152
deny from 219.153
deny from 219.154
deny from 219.155
deny from 219.156
deny from 219.157
deny from 219.158
deny from 219.159
deny from 219.216
deny from 219.217
deny from 219.218
deny from 219.219
deny from 219.220
deny from 219.221
deny from 219.222
deny from 219.223
deny from 219.224
deny from 219.225
deny from 219.226
deny from 219.227
deny from 219.228
deny from 219.229
deny from 219.230
deny from 219.231
deny from 219.232
deny from 219.233
deny from 219.234
deny from 219.235
deny from 219.236
deny from 219.237
deny from 219.238
deny from 219.239
deny from 219.242
deny from 219.243
deny from 219.244
deny from 219.245
deny from 219.246
deny from 219.247
deny from 220.101
deny from 220.112
deny from 220.113
deny from 220.114
deny from 220.115
deny from 220.160
deny from 220.161
deny from 220.162
deny from 220.163
deny from 220.164
deny from 220.165
deny from 220.166
deny from 220.167
deny from 220.168
deny from 220.169
deny from 220.170
deny from 220.171
deny from 220.172
deny from 220.173
deny from 220.174
deny from 220.175
deny from 220.176
deny from 220.177
deny from 220.178
deny from 220.179
deny from 220.180
deny from 220.181
deny from 220.182
deny from 220.183
deny from 220.184
deny from 220.185
deny from 220.186
deny from 220.187
deny from 220.188
deny from 220.189
deny from 220.190
deny from 220.191
deny from 220.192
deny from 220.193
deny from 220.194
deny from 220.195
deny from 220.196
deny from 220.197
deny from 220.198
deny from 220.199
deny from 220.200
deny from 220.201
deny from 220.202
deny from 220.203
deny from 220.204
deny from 220.205
deny from 220.206
deny from 220.207
deny from 220.231
deny from 220.231
deny from 220.232
deny from 220.234
deny from 220.248
deny from 220.249
deny from 220.250
deny from 220.251
deny from 220.252
deny from 221.0
deny from 221.1
deny from 221.2
deny from 221.3
deny from 221.4
deny from 221.5
deny from 221.6
deny from 221.7
deny from 221.8
deny from 221.9
deny from 221.10
deny from 221.11
deny from 221.12
deny from 221.13
deny from 221.14
deny from 221.15
deny from 221.122
deny from 221.123
deny from 221.129
deny from 221.130
deny from 221.131
deny from 221.136
deny from 221.137
deny from 221.172
deny from 221.173
deny from 221.174
deny from 221.175
deny from 221.176
deny from 221.177
deny from 221.178
deny from 221.179
deny from 221.180
deny from 221.181
deny from 221.182
deny from 221.183
deny from 221.192
deny from 221.193
deny from 221.194
deny from 221.195
deny from 221.196
deny from 221.197
deny from 221.198
deny from 221.199
deny from 221.200
deny from 221.201
deny from 221.202
deny from 221.203
deny from 221.204
deny from 221.205
deny from 221.206
deny from 221.207
deny from 221.208
deny from 221.209
deny from 221.210
deny from 221.211
deny from 221.212
deny from 221.213
deny from 221.214
deny from 221.215
deny from 221.216
deny from 221.217
deny from 221.218
deny from 221.219
deny from 221.220
deny from 221.221
deny from 221.222
deny from 221.223
deny from 221.224
deny from 221.225
deny from 221.226
deny from 221.227
deny from 221.228
deny from 221.229
deny from 221.230
deny from 221.231
deny from 221.232
deny from 221.233
deny from 221.234
deny from 221.235
deny from 221.236
deny from 221.237
deny from 221.238
deny from 221.239
deny from 222.16
deny from 222.17
deny from 222.18
deny from 222.19
deny from 222.20
deny from 222.21
deny from 222.22
deny from 222.23
deny from 222.24
deny from 222.25
deny from 222.26
deny from 222.27
deny from 222.28
deny from 222.29
deny from 222.30
deny from 222.31
deny from 222.32
deny from 222.33
deny from 222.34
deny from 222.35
deny from 222.36
deny from 222.37
deny from 222.38
deny from 222.39
deny from 222.40
deny from 222.41
deny from 222.42
deny from 222.43
deny from 222.44
deny from 222.45
deny from 222.46
deny from 222.47
deny from 222.48
deny from 222.49
deny from 222.50
deny from 222.51
deny from 222.52
deny from 222.53
deny from 222.54
deny from 222.55
deny from 222.56
deny from 222.57
deny from 222.58
deny from 222.59
deny from 222.60
deny from 222.61
deny from 222.62
deny from 222.63
deny from 222.64
deny from 222.65
deny from 222.66
deny from 222.67
deny from 222.68
deny from 222.69
deny from 222.70
deny from 222.71
deny from 222.72
deny from 222.73
deny from 222.74
deny from 222.75
deny from 222.76
deny from 222.77
deny from 222.78
deny from 222.79
deny from 222.80
deny from 222.81
deny from 222.82
deny from 222.83
deny from 222.84
deny from 222.85
deny from 222.86
deny from 222.87
deny from 222.88
deny from 222.89
deny from 222.90
deny from 222.91
deny from 222.92
deny from 222.93
deny from 222.94
deny from 222.95
deny from 222.125
deny from 222.128
deny from 222.129
deny from 222.130
deny from 222.131
deny from 222.132
deny from 222.133
deny from 222.134
deny from 222.135
deny from 222.136
deny from 222.137
deny from 222.138
deny from 222.139
deny from 222.140
deny from 222.141
deny from 222.142
deny from 222.143
deny from 222.160
deny from 222.161
deny from 222.162
deny from 222.163
deny from 222.168
deny from 222.169
deny from 222.170
deny from 222.171
deny from 222.172
deny from 222.173
deny from 222.174
deny from 222.175
deny from 222.176
deny from 222.177
deny from 222.178
deny from 222.179
deny from 222.180
deny from 222.181
deny from 222.182
deny from 222.183
deny from 222.184
deny from 222.185
deny from 222.186
deny from 222.187
deny from 222.188
deny from 222.189
deny from 222.190
deny from 222.191
deny from 222.192
deny from 222.193
deny from 222.194
deny from 222.195
deny from 222.196
deny from 222.197
deny from 222.198
deny from 222.199
deny from 222.200
deny from 222.201
deny from 222.202
deny from 222.203
deny from 222.204
deny from 222.205
deny from 222.206
deny from 222.207
deny from 222.208
deny from 222.209
deny from 222.210
deny from 222.211
deny from 222.212
deny from 222.213
deny from 222.214
deny from 222.215
deny from 222.216
deny from 222.217
deny from 222.218
deny from 222.219
deny from 222.220
deny from 222.221
deny from 222.222
deny from 222.223
deny from 222.240
deny from 222.241
deny from 222.242
deny from 222.243
deny from 222.244
deny from 222.245
deny from 222.246
deny from 222.247
deny from 222.248
deny from 222.249
allow from all
</LIMIT>

2012-1-30 18:22 Monday  

方法一,首先修改 httpd.conf 配置文件:
vi /etc/httpd/conf/httpd.conf
查找 Options Indexes FollowSymLinks,修改为 Options -Indexes。
 


 
方法二,在www 目录下的修改 .htaccess 配置文件:
加入 Options -Indexes

2012-1-30 18:22 Monday  
win 2000/xp系统,运行“CMD”,在命提示行下输入 ftp 回车,进入ftp命令提示行,用 open 命令连接ftp,以连接白白网的ftp为例:
ftp> open ftp.szele.net,
Connected to ftp.szele.net,
注:表示已连接上,后面还有一些欢迎之类的信息。
User (ftp.szele.net:(none)):
注:提示输入用户名
331 User name okay, need password.
Password:
注:提示用户名正确,请输入密码。
230 User logged in, proceed.
出现这个提示时表示你已经成功登陆。
输入格式命令修改密码。
ftp> quote site pswd 老密码 新密码
回车后提示:
230 Password changed okay.
密码已修改成功。
530 Cannot change password.
表示你不能修改密码。
mod_rewrite是Apache的一个非常强大的功能,它可以实现伪静态页面。下面我详细说说它的使用方法!对初学者很有用的哦!
1.检测Apache是否支持mod_rewrite
         通过php提供的phpinfo()函数查看环境配置,通过Ctrl+F查找到“Loaded Modules”,其中列出了所有apache2handler已经开启的模块,如果里面包括“mod_rewrite”,则已经支持,不再需要继续设 置。如果没有开启“mod_rewrite”,则打开目录 您的apache安装目录“/apache/conf/” 下的 httpd.conf 文件,通过Ctrl+F查找到“LoadModule rewrite_module”,将前面的”#”号删除即可。如果没有查找到,则到“LoadModule” 区域,在最后一行加入“LoadModule rewrite_module modules/mod_rewrite.so”(必选独占一行),然后重启apache服务器即可。
        
2.让apache服务器支持.htaccess
     如何让自己的本地APACHE服务器支持”.htaccess”呢?其实只要简单修改一下apache的httpd.conf设置就可以让APACHE支 持.htaccess了。打开httpd.conf文件(在那里? APACHE目录的CONF目录里面),用文本编辑器打开后,查找
<Directory />
     Options FollowSymLinks
     AllowOverride None
</Directory>
改为
<Directory />
     Options FollowSymLinks
     AllowOverride All
</Directory>
就可以了。

# /etc/init.d/httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
                                                           [FAILED]

1.netstat -lnp|grep 80

tcp        0      0 192.168.180.68:61027        0.0.0.0:*                   LISTEN      6289/oproxyd       
tcp        0      0 :::80                       :::*                        LISTEN      846/httpd           
tcp        0      0 ::ffff:192.168.180.68:7001 :::*                        LISTEN      32015/java         

找到pid 846

#ps 846

查看
#kill -9 846

杀掉

#./apachectl start

启动成功

*****************************************************************************
处理办法:
# ps -aux | grep http
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root     12079 0.0 0.0 61164   720 pts/1    S+   16:06   0:00 grep http
# ps -aux | grep apache
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
apache   10820 0.0 0.0   2044   600 ?        Ss   Jan01   0:04 bash
root     12081 0.0 0.0 61160   716 pts/1    S+   16:06   0:00 grep apache
# kill -9 10820
# /etc/init.d/httpd start
Starting httpd:                                            [ OK ]
# /etc/init.d/httpd restart
Stopping httpd:                                            [ OK ]
Starting httpd:                                            [ OK ]
**********************************************************

2012-1-30 18:10 Monday  

连接MYSQL:
   格式: mysql -h主机地址 -u用户名 -p用户密码
1、例1:连接到本机上的MYSQL
   找到mysql的安装目录,一般可以直接键入命令mysql -uroot -p,回车后提示你输密码,如果刚安装好MYSQL,超级用户root是没有密码的,故直接回车即可进入到MYSQL中了,MYSQL的提示符是:mysql>
2、连接到远程主机上的MYSQL
   假设远程主机的IP为:10.0.0.1,用户名为root,密码为123。则键入以下命令:
   mysql -h10.0.0.1 -uroot -p123
  (注:u与root可以不用加空格,其它也一样)
3、退出MYSQL命令
   exit (回车)

乱码的解决方法

导入sql脚本文件前,先确保该脚本文件及内容格式为UTF-8编码格式,
    同以上方法登入mysql命令行,use 库名  进入相应数据库
    set names utf8;
    source sql脚本文件名;
如 use  a;
 set names utf8;
source D:/db.sql;
方法二
create DATABASE wms_site_ks01 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;


原来是这样导的
mysql -u root -ppass dataname < 1.sql

 

 

一.MYSQL的命令行模式的设置:
桌面->我的电脑->属性->环境变量->新建->PATH=";path/mysql/bin;"  其中path为MYSQL的安装路径。
二.命令行进入MYSQL的方法:
1.C:\>mysql -h hostname -u username -p
按ENTER键,等待然后输入密码,这里hostname为服务器的名称,如localhost,username为MYSQL的用户名,如root.进入命令行就可以直接操作MYSQL了。
三.从数据库导出数据库文件:
1.将数据库mydb导出到e:\mysql\mydb.sql文件中:
打开开始->运行->输入cmd进入命令行模式
c:\>mysqldump -h localhost -u root -p mydb >e:\mysql\mydb.sql
然后输入密码,等待一会导出就成功了,可以到目标文件中检查是否成功。
2.将数据库mydb中的mytable导出到e:\mysql\mytable.sql文件中:
c:\>mysqldump -h localhost -u root -p mydb mytable >e:\mysql\mytable.sql
3.将数据库mydb的结构导出到e:\mysql\mydb_stru.sql文件中:
c:\>mysqldump -h localhost -u root -p mydb --add-drop-table >e:\mysql\mydb_stru.sql
//-h localhost可以省略,其一般在虚拟主机上用
四.从外部文件导入数据到数据库:
从e:\mysql\mydb2.sql中将文件中的SQL语句导入数据库中:
c:\>mysql -h localhost -u root -p mydb2 <e:\mysql\mydb2.sql
然后输入密码,就OK了
五.关于导入文件大小限制问题的解决:
默认情况下:mysql对导入的文件大小有限制的,最大为2M,所以当文件很大时,直接无法导入,解决列举如下:
1.在php.ini中修改相关参数:
影响Mysql导入文件大小的参数有三个:
memory_limit=128M, upload_max_filesize=2M, post_max_size=8M
修改upload_max_filesize=200M这里修改满足你需要的大小,可以同时修改其他两项memory_limit=250M ,post_max_size=200M.这样就可以导入200M以下的.sql文件了。

上文是把mysql放置在系统路径下,其实不放也可以。如我的mysql安装目录为D:\MySQL Server 5.0;
则首先打开dos窗口,然后输入D:(没有'\')回车
此时应该会出现D:\>这样的标志,然后在其后输入D:\MySQL Server 5.0\bin回车
出现D:\MySQL Server 5.0\bin>接着输入mysqldump -u root -p 数据库名 >数据库名.sql(也可以输入路径); (具体参照上面)
导入文件同样,只是改了'>'为'<'就可以了,或者直接用source也许:
常用source命令
进入mysql数据库控制台  : 如 mysql -u root -p
mysql>use 数据库
然后使用source命令,后面参数为脚本文件(这里用到的是.sql)
mysql>source d:\mydb.sql

2012-1-30 18:08 Monday  
Mysql my.ini 配置文件详解[转载]
#BEGIN CONFIG INFO
#DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载大
#TYPE: SYSTEM
#END CONFIG INFO
#
# 此mysql配置文件例子针对4G内存
# 主要使用INNODB
#处理复杂队列并且连接数量较少的mysql服务器
#
# 将此文件复制到/etc/my.cnf 作为全局设置,
# mysql-data-dir/my.cnf 作为服务器指定设置
# (@localstatedir@ for this installation) 或者放入
# ~/.my.cnf 作为用户设置.
#
# 在此配置文件中, 你可以使用所有程序支持的长选项.
# 如果想获悉程序支持的所有选项
# 请在程序后加上"--help"参数运行程序.
#
# 关于独立选项更多的细节信息可以在手册内找到
#
#
# 以下选项会被MySQL客户端应用读取.
# 注意只有MySQL附带的客户端应用程序保证可以读取这段内容.
# 如果你想你自己的MySQL应用程序获取这些值
# 需要在MySQL客户端库初始化的时候指定这些选项
#
[client]
#password = [your_password]
port = @MYSQL_TCP_PORT@
socket = @MYSQL_UNIX_ADDR@
# *** 应用定制选项 ***
#
#   MySQL 服务端
#
[mysqld]
# 一般配置选项
port = @MYSQL_TCP_PORT@
socket = @MYSQL_UNIX_ADDR@
# back_log 是操作系统在监听队列中所能保持的连接数,
# 队列保存了在MySQL连接管理器线程处理之前的连接.
# 如果你有非常高的连接率并且出现"connection refused" 报错,
# 你就应该增加此处的值.
# 检查你的操作系统文档来获取这个变量的最大值.
# 如果将back_log设定到比你操作系统限制更高的值,将会没有效果
back_log = 50
# 不在TCP/IP端口上进行监听.
# 如果所有的进程都是在同一台服务器连接到本地的mysqld,
# 这样设置将是增强安全的方法
# 所有mysqld的连接都是通过Unix sockets 或者命名管道进行的.
# 注意在windows下如果没有打开命名管道选项而只是用此项
# (通过 "enable-named-pipe" 选项) 将会导致mysql服务没有任何作用!
#skip-networking
# MySQL 服务所允许的同时会话数的上限
# 其中一个连接将被SUPER权限保留作为管理员登录.
# 即便已经达到了连接数的上限.
max_connections = 100
# 每个客户端连接最大的错误允许数量,如果达到了此限制.
# 这个客户端将会被MySQL服务阻止直到执行了"FLUSH HOSTS" 或者服务重启
# 非法的密码以及其他在链接时的错误会增加此值.
# 查看 "Aborted_connects" 状态来获取全局计数器.
max_connect_errors = 10
# 所有线程所打开表的数量.
# 增加此值就增加了mysqld所需要的文件描述符的数量
# 这样你需要确认在[mysqld_safe]中 "open-files-limit" 变量设置打开文件数量允许至少4096
table_cache = 2048
# 允许外部文件级别的锁. 打开文件锁会对性能造成负面影响
# 所以只有在你在同样的文件上运行多个数据库实例时才使用此选项(注意仍会有其他约束!)
# 或者你在文件层面上使用了其他一些软件依赖来锁定MyISAM表
#external-locking
# 服务所能处理的请求包的最大大小以及服务所能处理的最大的请求大小(当与大的BLOB字段一起工作时相当必要)
# 每个连接独立的大小.大小动态增加
max_allowed_packet = 16M
# 在一个事务中binlog为了记录SQL状态所持有的cache大小
# 如果你经常使用大的,多声明的事务,你可以增加此值来获取更大的性能.
# 所有从事务来的状态都将被缓冲在binlog缓冲中然后在提交后一次性写入到binlog中
# 如果事务比此值大, 会使用磁盘上的临时文件来替代.
# 此缓冲在每个连接的事务第一次更新状态时被创建
binlog_cache_size = 1M
# 独立的内存表所允许的最大容量.
# 此选项为了防止意外创建一个超大的内存表导致永尽所有的内存资源.
max_heap_table_size = 64M
# 排序缓冲被用来处理类似ORDER BY以及GROUP BY队列所引起的排序
# 如果排序后的数据无法放入排序缓冲,
# 一个用来替代的基于磁盘的合并分类会被使用
# 查看 "Sort_merge_passes" 状态变量.
# 在排序发生时由每个线程分配
sort_buffer_size = 8M
# 此缓冲被使用来优化全联合(full JOINs 不带索引的联合).
# 类似的联合在极大多数情况下有非常糟糕的性能表现,
# 但是将此值设大能够减轻性能影响.
# 通过 "Select_full_join" 状态变量查看全联合的数量
# 当全联合发生时,在每个线程中分配
join_buffer_size = 8M
# 我们在cache中保留多少线程用于重用
# 当一个客户端断开连接后,如果cache中的线程还少于thread_cache_size,
# 则客户端线程被放入cache中.
# 这可以在你需要大量新连接的时候极大的减少线程创建的开销
# (一般来说如果你有好的线程模型的话,这不会有明显的性能提升.)
thread_cache_size = 8
# 此允许应用程序给予线程系统一个提示在同一时间给予渴望被运行的线程的数量.
# 此值只对于支持 thread_concurrency() 函数的系统有意义( 例如Sun Solaris).
# 你可可以尝试使用 [CPU数量]*(2..4) 来作为thread_concurrency的值
thread_concurrency = 8
# 查询缓冲常被用来缓冲 SELECT 的结果并且在下一次同样查询的时候不再执行直接返回结果.
# 打开查询缓冲可以极大的提高服务器速度, 如果你有大量的相同的查询并且很少修改表.
# 查看 "Qcache_lowmem_prunes" 状态变量来检查是否当前值对于你的负载来说是否足够高.
# 注意: 在你表经常变化的情况下或者如果你的查询原文每次都不同,
# 查询缓冲也许引起性能下降而不是性能提升.
query_cache_size = 64M
# 只有小于此设定值的结果才会被缓冲
# 此设置用来保护查询缓冲,防止一个极大的结果集将其他所有的查询结果都覆盖.
query_cache_limit = 2M
# 被全文检索索引的最小的字长.
# 你也许希望减少它,如果你需要搜索更短字的时候.
# 注意在你修改此值之后,
# 你需要重建你的 FULLTEXT 索引
ft_min_word_len = 4
# 如果你的系统支持 memlock() 函数,你也许希望打开此选项用以让运行中的mysql在在内存高度紧张的时候,数据在内存中保持锁定并且防止可能被swapping out
# 此选项对于性能有益
#memlock
# 当创建新表时作为默认使用的表类型,
# 如果在创建表示没有特别执行表类型,将会使用此值
default_table_type = MYISAM
# 线程使用的堆大小. 此容量的内存在每次连接时被预留.
# MySQL 本身常不会需要超过64K的内存
# 如果你使用你自己的需要大量堆的UDF函数
# 或者你的操作系统对于某些操作需要更多的堆,
# 你也许需要将其设置的更高一点.
thread_stack = 192K
# 设定默认的事务隔离级别.可用的级别如下:
# READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, SERIALIZABLE
transaction_isolation = REPEATABLE-READ
# 内部(内存中)临时表的最大大小
# 如果一个表增长到比此值更大,将会自动转换为基于磁盘的表.
# 此限制是针对单个表的,而不是总和.
tmp_table_size = 64M
# 打开二进制日志功能.
# 在复制(replication)配置中,作为MASTER主服务器必须打开此项
# 如果你需要从你最后的备份中做基于时间点的恢复,你也同样需要二进制日志.
log-bin=mysql-bin
# 如果你在使用链式从服务器结构的复制模式 (A->B->C),
# 你需要在服务器B上打开此项.
# 此选项打开在从线程上重做过的更新的日志,
# 并将其写入从服务器的二进制日志.
#log_slave_updates
# 打开全查询日志. 所有的由服务器接收到的查询 (甚至对于一个错误语法的查询)
# 都会被记录下来. 这对于调试非常有用, 在生产环境中常常关闭此项.
#log
# 将警告打印输出到错误log文件.   如果你对于MySQL有任何问题
# 你应该打开警告log并且仔细审查错误日志,查出可能的原因.
#log_warnings
# 记录慢速查询. 慢速查询是指消耗了比 "long_query_time" 定义的更多时间的查询.
# 如果 log_long_format 被打开,那些没有使用索引的查询也会被记录.
# 如果你经常增加新查询到已有的系统内的话. 一般来说这是一个好主意,
log_slow_queries
# 所有的使用了比这个时间(以秒为单位)更多的查询会被认为是慢速查询.
# 不要在这里使用"1", 否则会导致所有的查询,甚至非常快的查询页被记录下来(由于MySQL 目前时间的精确度只能达到秒的级别).
long_query_time = 2
# 在慢速日志中记录更多的信息.
# 一般此项最好打开.
# 打开此项会记录使得那些没有使用索引的查询也被作为到慢速查询附加到慢速日志里
log_long_format
# 此目录被MySQL用来保存临时文件.例如,
# 它被用来处理基于磁盘的大型排序,和内部排序一样.
# 以及简单的临时表.
# 如果你不创建非常大的临时文件,将其放置到 swapfs/tmpfs 文件系统上也许比较好
# 另一种选择是你也可以将其放置在独立的磁盘上.
# 你可以使用";"来放置多个路径
# 他们会按照roud-robin方法被轮询使用.
#tmpdir = /tmp
# ***   复制有关的设置
# 唯一的服务辨识号,数值位于 1 到 2^32-1之间.
# 此值在master和slave上都需要设置.
# 如果 "master-host" 没有被设置,则默认为1, 但是如果忽略此选项,MySQL不会作为master生效.
server-id = 1
# 复制的Slave (去掉master段的注释来使其生效)
#
# 为了配置此主机作为复制的slave服务器,你可以选择两种方法:
#
# 1) 使用 CHANGE MASTER TO 命令 (在我们的手册中有完整描述) -
# 语法如下:
#
# CHANGE MASTER TO MASTER_HOST=, MASTER_PORT=,
# MASTER_USER=, MASTER_PASSWORD= ;
#
# 你需要替换掉 , ,   等被尖括号包围的字段以及使用master的端口号替换 (默认3306).
#
# 例子:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# 或者
#
# 2) 设置以下的变量. 不论如何, 在你选择这种方法的情况下, 然后第一次启动复制(甚至不成功的情况下,
#     例如如果你输入错密码在master-password字段并且slave无法连接),
# slave会创建一个 master.info 文件,并且之后任何对于包含在此文件内的参数的变化都会被忽略
# 并且由 master.info 文件内的内容覆盖, 除非你关闭slave服务, 删除 master.info 并且重启slave 服务.
# 由于这个原因,你也许不想碰一下的配置(注释掉的) 并且使用 CHANGE MASTER TO (查看上面) 来代替
#
# 所需要的唯一id号位于 2 和 2^32 - 1之间
# (并且和master不同)
# 如果master-host被设置了.则默认值是2
# 但是如果省略,则不会生效
#server-id = 2
#
# 复制结构中的master - 必须
#master-host =
#
# 当连接到master上时slave所用来认证的用户名 - 必须
#master-user =
#
# 当连接到master上时slave所用来认证的密码 - 必须
#master-password =
#
# master监听的端口.
# 可选 - 默认是3306
#master-port =
# 使得slave只读.只有用户拥有SUPER权限和在上面的slave线程能够修改数据.
# 你可以使用此项去保证没有应用程序会意外的修改slave而不是master上的数据
#read_only
#*** MyISAM 相关选项
# 关键词缓冲的大小, 一般用来缓冲MyISAM表的索引块.
# 不要将其设置大于你可用内存的30%,
# 因为一部分内存同样被OS用来缓冲行数据
# 甚至在你并不使用MyISAM 表的情况下, 你也需要仍旧设置起 8-64M 内存由于它同样会被内部临时磁盘表使用.
key_buffer_size = 32M
# 用来做MyISAM表全表扫描的缓冲大小.
# 当全表扫描需要时,在对应线程中分配.
read_buffer_size = 2M
# 当在排序之后,从一个已经排序好的序列中读取行时,行数据将从这个缓冲中读取来防止磁盘寻道.
# 如果你增高此值,可以提高很多ORDER BY的性能.
# 当需要时由每个线程分配
read_rnd_buffer_size = 16M
# MyISAM 使用特殊的类似树的cache来使得突发插入
# (这些插入是,INSERT ... SELECT, INSERT ... VALUES (...), (...), ..., 以及 LOAD DATA
# INFILE) 更快. 此变量限制每个进程中缓冲树的字节数.
# 设置为 0 会关闭此优化.
# 为了最优化不要将此值设置大于 "key_buffer_size".
# 当突发插入被检测到时此缓冲将被分配.
bulk_insert_buffer_size = 64M
# 此缓冲当MySQL需要在 REPAIR, OPTIMIZE, ALTER 以及 LOAD DATA INFILE 到一个空表中引起重建索引时被分配.
# 这在每个线程中被分配.所以在设置大值时需要小心.
myisam_sort_buffer_size = 128M
# MySQL重建索引时所允许的最大临时文件的大小 (当 REPAIR, ALTER TABLE 或者 LOAD DATA INFILE).
# 如果文件大小比此值更大,索引会通过键值缓冲创建(更慢)
myisam_max_sort_file_size = 10G
# 如果被用来更快的索引创建索引所使用临时文件大于制定的值,那就使用键值缓冲方法.
# 这主要用来强制在大表中长字串键去使用慢速的键值缓冲方法来创建索引.
myisam_max_extra_sort_file_size = 10G
# 如果一个表拥有超过一个索引, MyISAM 可以通过并行排序使用超过一个线程去修复他们.
# 这对于拥有多个CPU以及大量内存情况的用户,是一个很好的选择.
myisam_repair_threads = 1
# 自动检查和修复没有适当关闭的 MyISAM 表.
myisam_recover
# 默认关闭 Federated
skip-federated
# *** BDB 相关选项 ***
# 如果你运行的MySQL服务有BDB支持但是你不准备使用的时候使用此选项. 这会节省内存并且可能加速一些事.
skip-bdb
# *** INNODB 相关选项 ***
# 如果你的MySQL服务包含InnoDB支持但是并不打算使用的话,
# 使用此选项会节省内存以及磁盘空间,并且加速某些部分
#skip-innodb
# 附加的内存池被InnoDB用来保存 metadata 信息
# 如果InnoDB为此目的需要更多的内存,它会开始从OS这里申请内存.
# 由于这个操作在大多数现代操作系统上已经足够快, 你一般不需要修改此值.
# SHOW INNODB STATUS 命令会显示当先使用的数量.
innodb_additional_mem_pool_size = 16M
# InnoDB使用一个缓冲池来保存索引和原始数据, 不像 MyISAM.
# 这里你设置越大,你在存取表里面数据时所需要的磁盘I/O越少.
# 在一个独立使用的数据库服务器上,你可以设置这个变量到服务器物理内存大小的80%
# 不要设置过大,否则,由于物理内存的竞争可能导致操作系统的换页颠簸.
# 注意在32位系统上你每个进程可能被限制在 2-3.5G 用户层面内存限制,
# 所以不要设置的太高.
innodb_buffer_pool_size = 2G
# InnoDB 将数据保存在一个或者多个数据文件中成为表空间.
# 如果你只有单个逻辑驱动保存你的数据,一个单个的自增文件就足够好了.
# 其他情况下.每个设备一个文件一般都是个好的选择.
# 你也可以配置InnoDB来使用裸盘分区 - 请参考手册来获取更多相关内容
innodb_data_file_path = ibdata1:10M:autoextend
# 设置此选项如果你希望InnoDB表空间文件被保存在其他分区.
# 默认保存在MySQL的datadir中.
#innodb_data_home_dir =
# 用来同步IO操作的IO线程的数量. This value is
# 此值在Unix下被硬编码为4,但是在Windows磁盘I/O可能在一个大数值下表现的更好.
innodb_file_io_threads = 4
# 如果你发现InnoDB表空间损坏, 设置此值为一个非零值可能帮助你导出你的表.
# 从1开始并且增加此值知道你能够成功的导出表.
#innodb_force_recovery=1
# 在InnoDb核心内的允许线程数量.
# 最优值依赖于应用程序,硬件以及操作系统的调度方式.
# 过高的值可能导致线程的互斥颠簸.
innodb_thread_concurrency = 16
# 如果设置为1 ,InnoDB会在每次提交后刷新(fsync)事务日志到磁盘上,
# 这提供了完整的ACID行为.
# 如果你愿意对事务安全折衷, 并且你正在运行一个小的食物, 你可以设置此值到0或者2来减少由事务日志引起的磁盘I/O
# 0代表日志只大约每秒写入日志文件并且日志文件刷新到磁盘.
# 2代表日志写入日志文件在每次提交后,但是日志文件只有大约每秒才会刷新到磁盘上.
innodb_flush_log_at_trx_commit = 1
# 加速InnoDB的关闭. 这会阻止InnoDB在关闭时做全清除以及插入缓冲合并.
# 这可能极大增加关机时间, 但是取而代之的是InnoDB可能在下次启动时做这些操作.
#innodb_fast_shutdown
# 用来缓冲日志数据的缓冲区的大小.
# 当此值快满时, InnoDB将必须刷新数据到磁盘上.
# 由于基本上每秒都会刷新一次,所以没有必要将此值设置的太大(甚至对于长事务而言)
innodb_log_buffer_size = 8M
# 在日志组中每个日志文件的大小.
# 你应该设置日志文件总合大小到你缓冲池大小的25%~100%
# 来避免在日志文件覆写上不必要的缓冲池刷新行为.
# 不论如何, 请注意一个大的日志文件大小会增加恢复进程所需要的时间.
innodb_log_file_size = 256M
# 在日志组中的文件总数.
# 通常来说2~3是比较好的.
innodb_log_files_in_group = 3
# InnoDB的日志文件所在位置. 默认是MySQL的datadir.
# 你可以将其指定到一个独立的硬盘上或者一个RAID1卷上来提高其性能
#innodb_log_group_home_dir
# 在InnoDB缓冲池中最大允许的脏页面的比例.
# 如果达到限额, InnoDB会开始刷新他们防止他们妨碍到干净数据页面.
# 这是一个软限制,不被保证绝对执行.
innodb_max_dirty_pages_pct = 90
# InnoDB用来刷新日志的方法.
# 表空间总是使用双重写入刷新方法
# 默认值是 "fdatasync", 另一个是 "O_DSYNC".
#innodb_flush_method=O_DSYNC
# 在被回滚前,一个InnoDB的事务应该等待一个锁被批准多久.
# InnoDB在其拥有的锁表中自动检测事务死锁并且回滚事务.
# 如果你使用 LOCK TABLES 指令, 或者在同样事务中使用除了InnoDB以外的其他事务安全的存储引擎
# 那么一个死锁可能发生而InnoDB无法注意到.
# 这种情况下这个timeout值对于解决这种问题就非常有帮助.
innodb_lock_wait_timeout = 120
[mysqldump]
# 不要在将内存中的整个结果写入磁盘之前缓存. 在导出非常巨大的表时需要此项
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# 仅仅允许使用键值的 UPDATEs 和 DELETEs .
#safe-updates
[isamchk]
key_buffer = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M
[myisamchk]
key_buffer = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M
[mysqlhotcopy]
interactive-timeout
[mysqld_safe]
# 增加每个进程的可打开文件数量.
# 警告: 确认你已经将全系统限制设定的足够高!
# 打开大量表需要将此值设高
open-files-limit = 8192
服务器电脑速度很慢,打开任务管理器,httpd.exe进程占用cpu%100,关闭掉AppServ服务,cpu应用率立刻下降到0。
   重新启动AppServ又出现占用cpu高的情况。

   原因,httpd.exe和防火墙配置有冲突。
   解决方法如下:

  1.网上邻居->本地链接->属性->internet协议(TCP/IP)->属性->高级->wins标签->去掉起用LMhosts查询前的勾。

  2.控制面版->windows防火墙->高级标签->本地链接设置->服务的标签里勾选安全Web服务器(HTTPS)即。

  另外在网上有另外一种解决办法。
      
  找到httpd.conf配置文件

  修改ThreadsPerChild 的值为150 默认是250 万一你的服务器或vps内存超过2G 那么就不用设置

  经过修改防火墙设置http.exe占用cpu100%的问题解决!
2012-1-30 18:00 Monday  
如果有同域名下的其它域名接收,一定要放在泛解析的前面,否则无法正常访问。